diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs index 8f863034c3b7..28f8e3f504ae 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.net8.0.cs @@ -248,6 +248,7 @@ protected ContainerRegistryCredentialSetResource() { } public partial class ContainerRegistryData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku) { } + public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList DataEndpointHostNames { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption Encryption { get { throw null; } set { } } @@ -256,12 +257,14 @@ public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceMa public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } public string LoginServer { get { throw null; } } + public bool? NetworkRuleBypassAllowedForTasks { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies Policies { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus Status { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? ZoneRedundancy { get { throw null; } set { } } @@ -377,9 +380,11 @@ protected ContainerRegistryPrivateLinkResourceCollection() { } } public partial class ContainerRegistryPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ContainerRegistryPrivateLinkResourceData() { } + public ContainerRegistryPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + public System.Collections.Generic.IList RequiredPrivateLinkZoneNames { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -510,7 +515,11 @@ protected ContainerRegistryResource() { } public virtual System.Threading.Tasks.Task> RegenerateCredentialAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialRegenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ScheduleRun(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation ScheduleRun(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ScheduleRunAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> ScheduleRunAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -575,8 +584,12 @@ public partial class ContainerRegistryRunResource : Azure.ResourceManager.ArmRes protected ContainerRegistryRunResource() { } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Cancel(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Cancel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task CancelAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CancelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string runId) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -587,7 +600,11 @@ protected ContainerRegistryRunResource() { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ContainerRegistryTaskCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -654,7 +671,11 @@ protected ContainerRegistryTaskResource() { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ContainerRegistryTaskRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -966,7 +987,9 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetData ContainerRegistryCredentialSetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.Collections.Generic.IEnumerable authCredentials = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string loginServer, System.DateTimeOffset? createdOn, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, System.Collections.Generic.IEnumerable dataEndpointHostNames, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string loginServer, System.DateTimeOffset? createdOn, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, System.Collections.Generic.IEnumerable dataEndpointHostNames, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), bool? networkRuleBypassAllowedForTasks = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryDockerBuildStep ContainerRegistryDockerBuildStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, System.Collections.Generic.IEnumerable imageNames = null, bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), string dockerFilePath = null, string target = null, System.Collections.Generic.IEnumerable arguments = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string encodedTaskContent = null, string encodedValuesContent = null, System.Collections.Generic.IEnumerable values = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryFileTaskStep ContainerRegistryFileTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string taskFilePath = null, string valuesFilePath = null, System.Collections.Generic.IEnumerable values = null) { throw null; } @@ -976,11 +999,15 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSourceCredentials ContainerRegistryImportSourceCredentials(string username = null, string password = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryKeyVaultProperties ContainerRegistryKeyVaultProperties(string keyIdentifier = null, string versionedKeyIdentifier = null, string identity = null, bool? isKeyRotationEnabled = default(bool?), System.DateTimeOffset? lastKeyRotationTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryListCredentialsResult ContainerRegistryListCredentialsResult(string username = null, System.Collections.Generic.IEnumerable passwords = null) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType), string resourceGroupName = null, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(string availableLoginServerName = null, bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPassword ContainerRegistryPassword(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName? name = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName?), string value = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredPrivateLinkZoneNames = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryReplicationData ContainerRegistryReplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isRegionEndpointEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus ContainerRegistryResourceStatus(string displayStatus = null, string message = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRetentionPolicy ContainerRegistryRetentionPolicy(int? days = default(int?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus?)) { throw null; } @@ -1012,6 +1039,27 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.SourceUploadDefinition SourceUploadDefinition(System.Uri uploadUri = null, string relativePath = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoGeneratedDomainNameLabelScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoGeneratedDomainNameLabelScope(string value) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope NoReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope SubscriptionReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope TenantReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope Unsecure { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ConnectedRegistryActivationStatus : System.IEquatable { private readonly object _dummy; @@ -1431,6 +1479,8 @@ public partial class ContainerRegistryCredentials : System.ClientModel.Primitive { public ContainerRegistryCredentials() { } public System.Collections.Generic.IDictionary CustomRegistries { get { throw null; } } + public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryCredentials SourceRegistry { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryLoginMode? SourceRegistryLoginMode { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1812,7 +1862,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryNameAvailabilityContent(string name) { } + public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public string Name { get { throw null; } } + public string ResourceGroupName { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType ResourceType { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1824,6 +1876,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryNameAvailableResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerRegistryNameAvailableResult() { } + public string AvailableLoginServerName { get { throw null; } } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } @@ -1962,10 +2015,12 @@ public ContainerRegistryPatch() { } public bool? IsAdminUserEnabled { get { throw null; } set { } } public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } + public bool? NetworkRuleBypassAllowedForTasks { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies Policies { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2162,6 +2217,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerRegistryRoleAssignmentMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerRegistryRoleAssignmentMode(string value) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode AbacRepositoryPermissions { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode LegacyRegistryPermissions { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerRegistryRunArgument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryRunArgument(string name, string value) { } @@ -3163,6 +3236,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.SourceControlType left, Azure.ResourceManager.ContainerRegistry.Models.SourceControlType right) { throw null; } public override string ToString() { throw null; } } + public partial class SourceRegistryCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SourceRegistryCredentials() { } + public string Identity { get { throw null; } set { } } + public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryLoginMode? LoginMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SourceRegistryLoginMode : System.IEquatable { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs index 8f863034c3b7..28f8e3f504ae 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/api/Azure.ResourceManager.ContainerRegistry.netstandard2.0.cs @@ -248,6 +248,7 @@ protected ContainerRegistryCredentialSetResource() { } public partial class ContainerRegistryData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku) { } + public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList DataEndpointHostNames { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption Encryption { get { throw null; } set { } } @@ -256,12 +257,14 @@ public ContainerRegistryData(Azure.Core.AzureLocation location, Azure.ResourceMa public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } public string LoginServer { get { throw null; } } + public bool? NetworkRuleBypassAllowedForTasks { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies Policies { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus Status { get { throw null; } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? ZoneRedundancy { get { throw null; } set { } } @@ -377,9 +380,11 @@ protected ContainerRegistryPrivateLinkResourceCollection() { } } public partial class ContainerRegistryPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ContainerRegistryPrivateLinkResourceData() { } + public ContainerRegistryPrivateLinkResourceData() { } public string GroupId { get { throw null; } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + public System.Collections.Generic.IList RequiredPrivateLinkZoneNames { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -510,7 +515,11 @@ protected ContainerRegistryResource() { } public virtual System.Threading.Tasks.Task> RegenerateCredentialAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentialRegenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ScheduleRun(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation ScheduleRun(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ScheduleRunAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> ScheduleRunAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -575,8 +584,12 @@ public partial class ContainerRegistryRunResource : Azure.ResourceManager.ArmRes protected ContainerRegistryRunResource() { } public virtual Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Cancel(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Cancel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task CancelAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CancelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string registryName, string runId) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -587,7 +600,11 @@ protected ContainerRegistryRunResource() { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRunPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ContainerRegistryTaskCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -654,7 +671,11 @@ protected ContainerRegistryTaskResource() { } Azure.ResourceManager.ContainerRegistry.ContainerRegistryTaskData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryTaskPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ContainerRegistryTaskRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -966,7 +987,9 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryCredentialSetData ContainerRegistryCredentialSetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.Collections.Generic.IEnumerable authCredentials = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string loginServer, System.DateTimeOffset? createdOn, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, System.Collections.Generic.IEnumerable dataEndpointHostNames, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string loginServer, System.DateTimeOffset? createdOn, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, System.Collections.Generic.IEnumerable dataEndpointHostNames, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryData ContainerRegistryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string loginServer = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies policies = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = default(bool?), System.Collections.Generic.IEnumerable dataEndpointHostNames = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption?), bool? networkRuleBypassAllowedForTasks = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?), bool? isAnonymousPullEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryDockerBuildStep ContainerRegistryDockerBuildStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, System.Collections.Generic.IEnumerable imageNames = null, bool? isPushEnabled = default(bool?), bool? noCache = default(bool?), string dockerFilePath = null, string target = null, System.Collections.Generic.IEnumerable arguments = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string encodedTaskContent = null, string encodedValuesContent = null, System.Collections.Generic.IEnumerable values = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryFileTaskStep ContainerRegistryFileTaskStep(System.Collections.Generic.IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string taskFilePath = null, string valuesFilePath = null, System.Collections.Generic.IEnumerable values = null) { throw null; } @@ -976,11 +999,15 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryImportSourceCredentials ContainerRegistryImportSourceCredentials(string username = null, string password = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryKeyVaultProperties ContainerRegistryKeyVaultProperties(string keyIdentifier = null, string versionedKeyIdentifier = null, string identity = null, bool? isKeyRotationEnabled = default(bool?), System.DateTimeOffset? lastKeyRotationTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryListCredentialsResult ContainerRegistryListCredentialsResult(string username = null, System.Collections.Generic.IEnumerable passwords = null) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType resourceType = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType), string resourceGroupName = null, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(string availableLoginServerName = null, bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPassword ContainerRegistryPassword(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName? name = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPasswordName?), string value = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredPrivateLinkZoneNames = null) { throw null; } public static Azure.ResourceManager.ContainerRegistry.ContainerRegistryReplicationData ContainerRegistryReplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryProvisioningState?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus status = null, bool? isRegionEndpointEnabled = default(bool?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryZoneRedundancy?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceStatus ContainerRegistryResourceStatus(string displayStatus = null, string message = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRetentionPolicy ContainerRegistryRetentionPolicy(int? days = default(int?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus? status = default(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicyStatus?)) { throw null; } @@ -1012,6 +1039,27 @@ public static partial class ArmContainerRegistryModelFactory public static Azure.ResourceManager.ContainerRegistry.Models.SourceUploadDefinition SourceUploadDefinition(System.Uri uploadUri = null, string relativePath = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoGeneratedDomainNameLabelScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoGeneratedDomainNameLabelScope(string value) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope NoReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope SubscriptionReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope TenantReuse { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope Unsecure { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope left, Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ConnectedRegistryActivationStatus : System.IEquatable { private readonly object _dummy; @@ -1431,6 +1479,8 @@ public partial class ContainerRegistryCredentials : System.ClientModel.Primitive { public ContainerRegistryCredentials() { } public System.Collections.Generic.IDictionary CustomRegistries { get { throw null; } } + public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryCredentials SourceRegistry { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryLoginMode? SourceRegistryLoginMode { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1812,7 +1862,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryNameAvailabilityContent(string name) { } + public Azure.ResourceManager.ContainerRegistry.Models.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get { throw null; } set { } } public string Name { get { throw null; } } + public string ResourceGroupName { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryResourceType ResourceType { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1824,6 +1876,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ContainerRegistryNameAvailableResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ContainerRegistryNameAvailableResult() { } + public string AvailableLoginServerName { get { throw null; } } public bool? IsNameAvailable { get { throw null; } } public string Message { get { throw null; } } public string Reason { get { throw null; } } @@ -1962,10 +2015,12 @@ public ContainerRegistryPatch() { } public bool? IsAdminUserEnabled { get { throw null; } set { } } public bool? IsAnonymousPullEnabled { get { throw null; } set { } } public bool? IsDataEndpointEnabled { get { throw null; } set { } } + public bool? NetworkRuleBypassAllowedForTasks { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryNetworkRuleSet NetworkRuleSet { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPolicies Policies { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get { throw null; } set { } } public Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistrySku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2162,6 +2217,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerRegistryRoleAssignmentMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerRegistryRoleAssignmentMode(string value) { throw null; } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode AbacRepositoryPermissions { get { throw null; } } + public static Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode LegacyRegistryPermissions { get { throw null; } } + public bool Equals(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode left, Azure.ResourceManager.ContainerRegistry.Models.ContainerRegistryRoleAssignmentMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class ContainerRegistryRunArgument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerRegistryRunArgument(string name, string value) { } @@ -3163,6 +3236,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ContainerRegistry.Models.SourceControlType left, Azure.ResourceManager.ContainerRegistry.Models.SourceControlType right) { throw null; } public override string ToString() { throw null; } } + public partial class SourceRegistryCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SourceRegistryCredentials() { } + public string Identity { get { throw null; } set { } } + public Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryLoginMode? LoginMode { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ContainerRegistry.Models.SourceRegistryCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SourceRegistryLoginMode : System.IEquatable { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json index af96147e0919..0dab1b8ea19f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/assets.json @@ -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" } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryPrivateLinkResourceData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryPrivateLinkResourceData.cs new file mode 100644 index 000000000000..b4d46d2bac87 --- /dev/null +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryPrivateLinkResourceData.cs @@ -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. + /// The private link resource Private link DNS zone name. + [WirePath("properties.requiredZoneNames")] + [EditorBrowsable(EditorBrowsableState.Never)] + public IReadOnlyList RequiredZoneNames { get => (IReadOnlyList)RequiredPrivateLinkZoneNames; } + } +} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryResource.cs new file mode 100644 index 000000000000..9cec5f91e6df --- /dev/null +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryResource.cs @@ -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 methods back for compatibility reasons. + public partial class ContainerRegistryResource + { + /// + /// Schedules a new run based on the request parameters and add it to the run queue. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun + /// + /// + /// Operation Id + /// Schedules_ScheduleRun + /// + /// + /// Default Api Version + /// 2019-06-01-preview + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters of a run that needs to scheduled. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> 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(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; + } + } + + /// + /// Schedules a new run based on the request parameters and add it to the run queue. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun + /// + /// + /// Operation Id + /// Schedules_ScheduleRun + /// + /// + /// Default Api Version + /// 2019-06-01-preview + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters of a run that needs to scheduled. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation 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(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; + } + } + } +} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryRunResource.cs new file mode 100644 index 000000000000..cd948ed17f2d --- /dev/null +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryRunResource.cs @@ -0,0 +1,206 @@ +// 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 `Cancel` and `Update` operations are no longer LRO, add these methods back for compatibility reasons. + public partial class ContainerRegistryRunResource + { + /// + /// Cancel an existing run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel + /// + /// + /// Operation Id + /// Runs_Cancel + /// + /// + /// Default Api Version + /// 2019-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task CancelAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Cancel"); + scope.Start(); + try + { + var response = await _containerRegistryRunRunsRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _containerRegistryRunRunsRestClient.CreateCancelRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Post, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Cancel an existing run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel + /// + /// + /// Operation Id + /// Runs_Cancel + /// + /// + /// Default Api Version + /// 2019-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Cancel(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Cancel"); + scope.Start(); + try + { + var response = _containerRegistryRunRunsRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _containerRegistryRunRunsRestClient.CreateCancelRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Post, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the run properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId} + /// + /// + /// Operation Id + /// Runs_Update + /// + /// + /// Default Api Version + /// 2019-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The run update properties. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Update"); + scope.Start(); + try + { + var response = await _containerRegistryRunRunsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var uri = _containerRegistryRunRunsRestClient.CreateUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Patch, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(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; + } + } + + /// + /// Patch the run properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId} + /// + /// + /// Operation Id + /// Runs_Update + /// + /// + /// Default Api Version + /// 2019-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The run update properties. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Update"); + scope.Start(); + try + { + var response = _containerRegistryRunRunsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var uri = _containerRegistryRunRunsRestClient.CreateUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Patch, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(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; + } + } + } +} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryTaskResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryTaskResource.cs new file mode 100644 index 000000000000..5e6e5882b74c --- /dev/null +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/ContainerRegistryTaskResource.cs @@ -0,0 +1,116 @@ +// 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 `Update` operation is no longer LRO, add these methods back for compatibility reasons. + public partial class ContainerRegistryTaskResource + { + /// + /// Updates a task with the specified parameters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName} + /// + /// + /// Operation Id + /// Tasks_Update + /// + /// + /// Default Api Version + /// 2019-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters for updating a task. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _containerRegistryTaskTasksClientDiagnostics.CreateScope("ContainerRegistryTaskResource.Update"); + scope.Start(); + try + { + var response = await _containerRegistryTaskTasksRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var uri = _containerRegistryTaskTasksRestClient.CreateUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Patch, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(Response.FromValue(new ContainerRegistryTaskResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a task with the specified parameters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName} + /// + /// + /// Operation Id + /// Tasks_Update + /// + /// + /// Default Api Version + /// 2019-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters for updating a task. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _containerRegistryTaskTasksClientDiagnostics.CreateScope("ContainerRegistryTaskResource.Update"); + scope.Start(); + try + { + var response = _containerRegistryTaskTasksRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var uri = _containerRegistryTaskTasksRestClient.CreateUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Patch, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(Response.FromValue(new ContainerRegistryTaskResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/Models/ContainerRegistryCredentials.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/Models/ContainerRegistryCredentials.cs new file mode 100644 index 000000000000..5f0617464d91 --- /dev/null +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Custom/Models/ContainerRegistryCredentials.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerRegistry.Models +{ + public partial class ContainerRegistryCredentials + { + // The `SourceRegistryCredentials` class now has more properties, add this property back for compatibility reasons. + /// + /// The authentication mode which determines the source registry login scope. The credentials for the source registry + /// will be generated using the given scope. These credentials will be used to login to + /// the source registry during the run. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + [WirePath("sourceRegistry.loginMode")] + public SourceRegistryLoginMode? SourceRegistryLoginMode + { + get => SourceRegistry is null ? default : SourceRegistry.LoginMode; + set + { + if (SourceRegistry is null) + SourceRegistry = new SourceRegistryCredentials(); + SourceRegistry.LoginMode = value; + } + } + } +} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs index 22250a1b72f1..f564e96dd025 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ArmContainerRegistryModelFactory.cs @@ -17,6 +17,161 @@ namespace Azure.ResourceManager.ContainerRegistry.Models /// Model factory for models. public static partial class ArmContainerRegistryModelFactory { + /// Initializes a new instance of . + /// The name of the container registry. + /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. + /// The resource group name of the container registry. + /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". + /// A new instance for mocking. + public static ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, ContainerRegistryResourceType resourceType = default, string resourceGroupName = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null) + { + return new ContainerRegistryNameAvailabilityContent(name, resourceType, resourceGroupName, autoGeneratedDomainNameLabelScope, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The complete login server name with domain name label (DNL) hash, if available. + /// The value that indicates whether the name is available. + /// If any, the reason that the name is not available. + /// If any, the error message that provides more detail for the reason that the name is not available. + /// A new instance for mocking. + public static ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(string availableLoginServerName = null, bool? isNameAvailable = null, string reason = null, string message = null) + { + return new ContainerRegistryNameAvailableResult(availableLoginServerName, isNameAvailable, reason, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The SKU of the container registry. + /// The identity of the container registry. + /// The URL that can be used to log into the container registry. + /// The creation date of the container registry in ISO8601 format. + /// The provisioning state of the container registry at the time the operation was called. + /// The status of the container registry at the time the operation was called. + /// The value that indicates whether the admin user is enabled. + /// The network rule set for a container registry. + /// The policies for a container registry. + /// The encryption settings of container registry. + /// Enable a single data endpoint per region for serving data. + /// List of host names that will serve data when dataEndpointEnabled is true. + /// List of private endpoint connections for a container registry. + /// Whether or not public network access is allowed for the container registry. + /// Whether to allow trusted Azure services to access a network restricted registry. + /// Whether or not Tasks allowed to bypass the network rules for this container registry. + /// Whether or not zone redundancy is enabled for this container registry. + /// Enables registry-wide pull from unauthenticated clients. + /// Determines the domain name label reuse scope. + /// Determines registry role assignment mode. + /// A new instance for mocking. + public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerRegistrySku sku = null, ManagedServiceIdentity identity = null, string loginServer = null, DateTimeOffset? createdOn = null, ContainerRegistryProvisioningState? provisioningState = null, ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = null, ContainerRegistryNetworkRuleSet networkRuleSet = null, ContainerRegistryPolicies policies = null, ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = null, IEnumerable dataEndpointHostNames = null, IEnumerable privateEndpointConnections = null, ContainerRegistryPublicNetworkAccess? publicNetworkAccess = null, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = null, bool? networkRuleBypassAllowedForTasks = null, ContainerRegistryZoneRedundancy? zoneRedundancy = null, bool? isAnonymousPullEnabled = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, ContainerRegistryRoleAssignmentMode? roleAssignmentMode = null) + { + tags ??= new Dictionary(); + dataEndpointHostNames ??= new List(); + privateEndpointConnections ??= new List(); + + return new ContainerRegistryData( + id, + name, + resourceType, + systemData, + tags, + location, + sku, + identity, + loginServer, + createdOn, + provisioningState, + status, + isAdminUserEnabled, + networkRuleSet, + policies, + encryption, + isDataEndpointEnabled, + dataEndpointHostNames?.ToList(), + privateEndpointConnections?.ToList(), + publicNetworkAccess, + networkRuleBypassOptions, + networkRuleBypassAllowedForTasks, + zoneRedundancy, + isAnonymousPullEnabled, + autoGeneratedDomainNameLabelScope, + roleAssignmentMode, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The short label for the status. + /// The detailed message for the status, including alerts and error messages. + /// The timestamp when the status was changed to the current value. + /// A new instance for mocking. + public static ContainerRegistryResourceStatus ContainerRegistryResourceStatus(string displayStatus = null, string message = null, DateTimeOffset? timestamp = null) + { + return new ContainerRegistryResourceStatus(displayStatus, message, timestamp, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The number of days to retain an untagged manifest after which it gets purged. + /// The timestamp when the policy was last updated. + /// The value that indicates whether the policy is enabled or not. + /// A new instance for mocking. + public static ContainerRegistryRetentionPolicy ContainerRegistryRetentionPolicy(int? days = null, DateTimeOffset? lastUpdatedOn = null, ContainerRegistryPolicyStatus? status = null) + { + return new ContainerRegistryRetentionPolicy(days, lastUpdatedOn, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Key vault uri to access the encryption key. + /// The fully qualified key identifier that includes the version of the key that is actually used for encryption. + /// The client id of the identity which will be used to access key vault. + /// Auto key rotation status for a CMK enabled registry. + /// Timestamp of the last successful key rotation. + /// A new instance for mocking. + public static ContainerRegistryKeyVaultProperties ContainerRegistryKeyVaultProperties(string keyIdentifier = null, string versionedKeyIdentifier = null, string identity = null, bool? isKeyRotationEnabled = null, DateTimeOffset? lastKeyRotationTimestamp = null) + { + return new ContainerRegistryKeyVaultProperties( + keyIdentifier, + versionedKeyIdentifier, + identity, + isKeyRotationEnabled, + lastKeyRotationTimestamp, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource of private endpoint. + /// A collection of information about the state of the connection between service consumer and provider. + /// The provisioning state of private endpoint connection resource. + /// A new instance for mocking. + public static ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, ContainerRegistryPrivateLinkServiceConnectionState connectionState = null, ContainerRegistryProvisioningState? provisioningState = null) + { + return new ContainerRegistryPrivateEndpointConnectionData( + id, + name, + resourceType, + systemData, + privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, + connectionState, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The SKU name of the container registry. Required for registry creation. + /// The SKU tier based on the SKU name. + /// A new instance for mocking. + public static ContainerRegistrySku ContainerRegistrySku(ContainerRegistrySkuName name = default, ContainerRegistrySkuTier? tier = null) + { + return new ContainerRegistrySku(name, tier, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -56,8 +211,8 @@ public static ContainerRegistryCacheRuleData ContainerRegistryCacheRuleData(Reso /// The current version of ACR runtime on the connected registry. /// The current connection state of the connected registry. /// The last activity time of the connected registry. - /// - /// The properties of the connected registry parent. + /// The activation properties of the connected registry. + /// The parent of the connected registry. /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. /// The login server properties of the connected registry. /// The logging properties of the connected registry. @@ -81,7 +236,7 @@ public static ConnectedRegistryData ConnectedRegistryData(ResourceIdentifier id version, connectionState, lastActivityOn, - activationStatus != null ? new ConnectedRegistryPropertiesActivation(activationStatus, serializedAdditionalRawData: null) : null, + activationStatus != null ? new ConnectedRegistryActivation(activationStatus, serializedAdditionalRawData: null) : null, parent, clientTokenIds?.ToList(), loginServer, @@ -141,7 +296,7 @@ public static ContainerRegistryTlsCertificateProperties ContainerRegistryTlsCert /// Initializes a new instance of . /// The component of the connected registry corresponding to the status. - /// The code of the status. + /// The HTTP status code. /// The description of the status. /// The timestamp of the status. /// The correlation ID of the status. @@ -209,6 +364,28 @@ public static ContainerRegistryCredentialHealth ContainerRegistryCredentialHealt return new ContainerRegistryCredentialHealth(status, errorCode, errorMessage, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The username for a container registry. + /// The list of passwords for a container registry. + /// A new instance for mocking. + public static ContainerRegistryGenerateCredentialsResult ContainerRegistryGenerateCredentialsResult(string username = null, IEnumerable passwords = null) + { + passwords ??= new List(); + + return new ContainerRegistryGenerateCredentialsResult(username, passwords?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The creation datetime of the password. + /// The expiry datetime of the password. + /// The password name "password1" or "password2". + /// The password value. + /// A new instance for mocking. + public static ContainerRegistryTokenPassword ContainerRegistryTokenPassword(DateTimeOffset? createdOn = null, DateTimeOffset? expireOn = null, ContainerRegistryTokenPasswordName? name = null, string value = null) + { + return new ContainerRegistryTokenPassword(createdOn, expireOn, name, value, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The source of the image. /// List of strings of the form repo[:tag]. When tag is omitted the source will be used (or 'latest' if source tag is also omitted). @@ -248,150 +425,24 @@ public static ContainerRegistryImportSourceCredentials ContainerRegistryImportSo return new ContainerRegistryImportSourceCredentials(username, password, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The name of the container registry. - /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. - /// A new instance for mocking. - public static ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name = null, ContainerRegistryResourceType resourceType = default) - { - return new ContainerRegistryNameAvailabilityContent(name, resourceType, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The value that indicates whether the name is available. - /// If any, the reason that the name is not available. - /// If any, the error message that provides more detail for the reason that the name is not available. - /// A new instance for mocking. - public static ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable = null, string reason = null, string message = null) - { - return new ContainerRegistryNameAvailableResult(isNameAvailable, reason, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The resource of private endpoint. - /// A collection of information about the state of the connection between service consumer and provider. - /// The provisioning state of private endpoint connection resource. - /// A new instance for mocking. - public static ContainerRegistryPrivateEndpointConnectionData ContainerRegistryPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, ContainerRegistryPrivateLinkServiceConnectionState connectionState = null, ContainerRegistryProvisioningState? provisioningState = null) - { - return new ContainerRegistryPrivateEndpointConnectionData( - id, - name, - resourceType, - systemData, - privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, - connectionState, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The SKU of the container registry. - /// The identity of the container registry. - /// The URL that can be used to log into the container registry. - /// The creation date of the container registry in ISO8601 format. - /// The provisioning state of the container registry at the time the operation was called. - /// The status of the container registry at the time the operation was called. - /// The value that indicates whether the admin user is enabled. - /// The network rule set for a container registry. - /// The policies for a container registry. - /// The encryption settings of container registry. - /// Enable a single data endpoint per region for serving data. - /// List of host names that will serve data when dataEndpointEnabled is true. - /// List of private endpoint connections for a container registry. - /// Whether or not public network access is allowed for the container registry. - /// Whether to allow trusted Azure services to access a network restricted registry. - /// Whether or not zone redundancy is enabled for this container registry. - /// Enables registry-wide pull from unauthenticated clients. - /// A new instance for mocking. - public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerRegistrySku sku = null, ManagedServiceIdentity identity = null, string loginServer = null, DateTimeOffset? createdOn = null, ContainerRegistryProvisioningState? provisioningState = null, ContainerRegistryResourceStatus status = null, bool? isAdminUserEnabled = null, ContainerRegistryNetworkRuleSet networkRuleSet = null, ContainerRegistryPolicies policies = null, ContainerRegistryEncryption encryption = null, bool? isDataEndpointEnabled = null, IEnumerable dataEndpointHostNames = null, IEnumerable privateEndpointConnections = null, ContainerRegistryPublicNetworkAccess? publicNetworkAccess = null, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = null, ContainerRegistryZoneRedundancy? zoneRedundancy = null, bool? isAnonymousPullEnabled = null) - { - tags ??= new Dictionary(); - dataEndpointHostNames ??= new List(); - privateEndpointConnections ??= new List(); - - return new ContainerRegistryData( - id, - name, - resourceType, - systemData, - tags, - location, - sku, - identity, - loginServer, - createdOn, - provisioningState, - status, - isAdminUserEnabled, - networkRuleSet, - policies, - encryption, - isDataEndpointEnabled, - dataEndpointHostNames?.ToList(), - privateEndpointConnections?.ToList(), - publicNetworkAccess, - networkRuleBypassOptions, - zoneRedundancy, - isAnonymousPullEnabled, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The SKU name of the container registry. Required for registry creation. - /// The SKU tier based on the SKU name. - /// A new instance for mocking. - public static ContainerRegistrySku ContainerRegistrySku(ContainerRegistrySkuName name = default, ContainerRegistrySkuTier? tier = null) - { - return new ContainerRegistrySku(name, tier, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The short label for the status. - /// The detailed message for the status, including alerts and error messages. - /// The timestamp when the status was changed to the current value. - /// A new instance for mocking. - public static ContainerRegistryResourceStatus ContainerRegistryResourceStatus(string displayStatus = null, string message = null, DateTimeOffset? timestamp = null) + /// Initializes a new instance of . + /// The username for a container registry. + /// The list of passwords for a container registry. + /// A new instance for mocking. + public static ContainerRegistryListCredentialsResult ContainerRegistryListCredentialsResult(string username = null, IEnumerable passwords = null) { - return new ContainerRegistryResourceStatus(displayStatus, message, timestamp, serializedAdditionalRawData: null); - } + passwords ??= new List(); - /// Initializes a new instance of . - /// The number of days to retain an untagged manifest after which it gets purged. - /// The timestamp when the policy was last updated. - /// The value that indicates whether the policy is enabled or not. - /// A new instance for mocking. - public static ContainerRegistryRetentionPolicy ContainerRegistryRetentionPolicy(int? days = null, DateTimeOffset? lastUpdatedOn = null, ContainerRegistryPolicyStatus? status = null) - { - return new ContainerRegistryRetentionPolicy(days, lastUpdatedOn, status, serializedAdditionalRawData: null); + return new ContainerRegistryListCredentialsResult(username, passwords?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Key vault uri to access the encryption key. - /// The fully qualified key identifier that includes the version of the key that is actually used for encryption. - /// The client id of the identity which will be used to access key vault. - /// Auto key rotation status for a CMK enabled registry. - /// Timestamp of the last successful key rotation. - /// A new instance for mocking. - public static ContainerRegistryKeyVaultProperties ContainerRegistryKeyVaultProperties(string keyIdentifier = null, string versionedKeyIdentifier = null, string identity = null, bool? isKeyRotationEnabled = null, DateTimeOffset? lastKeyRotationTimestamp = null) + /// Initializes a new instance of . + /// The password name. + /// The password value. + /// A new instance for mocking. + public static ContainerRegistryPassword ContainerRegistryPassword(ContainerRegistryPasswordName? name = null, string value = null) { - return new ContainerRegistryKeyVaultProperties( - keyIdentifier, - versionedKeyIdentifier, - identity, - isKeyRotationEnabled, - lastKeyRotationTimestamp, - serializedAdditionalRawData: null); + return new ContainerRegistryPassword(name, value, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -412,12 +463,12 @@ public static ContainerRegistryUsage ContainerRegistryUsage(string name = null, /// The systemData. /// The private link resource group id. /// The private link resource required member names. - /// The private link resource Private link DNS zone name. + /// The private link resource private link DNS zone name. /// A new instance for mocking. - public static ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + public static ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredPrivateLinkZoneNames = null) { requiredMembers ??= new List(); - requiredZoneNames ??= new List(); + requiredPrivateLinkZoneNames ??= new List(); return new ContainerRegistryPrivateLinkResourceData( id, @@ -426,30 +477,10 @@ public static ContainerRegistryPrivateLinkResourceData ContainerRegistryPrivateL systemData, groupId, requiredMembers?.ToList(), - requiredZoneNames?.ToList(), + requiredPrivateLinkZoneNames?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The username for a container registry. - /// The list of passwords for a container registry. - /// A new instance for mocking. - public static ContainerRegistryListCredentialsResult ContainerRegistryListCredentialsResult(string username = null, IEnumerable passwords = null) - { - passwords ??= new List(); - - return new ContainerRegistryListCredentialsResult(username, passwords?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The password name. - /// The password value. - /// A new instance for mocking. - public static ContainerRegistryPassword ContainerRegistryPassword(ContainerRegistryPasswordName? name = null, string value = null) - { - return new ContainerRegistryPassword(name, value, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -538,28 +569,6 @@ public static ContainerRegistryTokenData ContainerRegistryTokenData(ResourceIden serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The creation datetime of the password. - /// The expiry datetime of the password. - /// The password name "password1" or "password2". - /// The password value. - /// A new instance for mocking. - public static ContainerRegistryTokenPassword ContainerRegistryTokenPassword(DateTimeOffset? createdOn = null, DateTimeOffset? expireOn = null, ContainerRegistryTokenPasswordName? name = null, string value = null) - { - return new ContainerRegistryTokenPassword(createdOn, expireOn, name, value, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The username for a container registry. - /// The list of passwords for a container registry. - /// A new instance for mocking. - public static ContainerRegistryGenerateCredentialsResult ContainerRegistryGenerateCredentialsResult(string username = null, IEnumerable passwords = null) - { - passwords ??= new List(); - - return new ContainerRegistryGenerateCredentialsResult(username, passwords?.ToList(), serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -617,12 +626,15 @@ public static ContainerRegistryWebhookCreateOrUpdateContent ContainerRegistryWeb serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The event ID. - /// A new instance for mocking. - public static ContainerRegistryWebhookEventInfo ContainerRegistryWebhookEventInfo(Guid? id = null) + /// Initializes a new instance of . + /// The service URI for the webhook to post notifications. + /// Custom headers that will be added to the webhook notifications. + /// A new instance for mocking. + public static ContainerRegistryWebhookCallbackConfig ContainerRegistryWebhookCallbackConfig(Uri serviceUri = null, IReadOnlyDictionary customHeaders = null) { - return new ContainerRegistryWebhookEventInfo(id, serializedAdditionalRawData: null); + customHeaders ??= new Dictionary(); + + return new ContainerRegistryWebhookCallbackConfig(serviceUri, customHeaders, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -750,15 +762,12 @@ public static ContainerRegistryWebhookEventResponseMessage ContainerRegistryWebh serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The service URI for the webhook to post notifications. - /// Custom headers that will be added to the webhook notifications. - /// A new instance for mocking. - public static ContainerRegistryWebhookCallbackConfig ContainerRegistryWebhookCallbackConfig(Uri serviceUri = null, IReadOnlyDictionary customHeaders = null) + /// Initializes a new instance of . + /// The event ID. + /// A new instance for mocking. + public static ContainerRegistryWebhookEventInfo ContainerRegistryWebhookEventInfo(Guid? id = null) { - customHeaders ??= new Dictionary(); - - return new ContainerRegistryWebhookCallbackConfig(serviceUri, customHeaders, serializedAdditionalRawData: null); + return new ContainerRegistryWebhookEventInfo(id, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -801,6 +810,15 @@ public static ContainerRegistryAgentPoolQueueStatus ContainerRegistryAgentPoolQu return new ContainerRegistryAgentPoolQueueStatus(count, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The URL where the client can upload the source. + /// The relative path to the source. This is used to submit the subsequent queue build request. + /// A new instance for mocking. + public static SourceUploadDefinition SourceUploadDefinition(Uri uploadUri = null, string relativePath = null) + { + return new SourceUploadDefinition(uploadUri, relativePath, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -864,15 +882,6 @@ public static ContainerRegistryRunData ContainerRegistryRunData(ResourceIdentifi serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The URL where the client can upload the source. - /// The relative path to the source. This is used to submit the subsequent queue build request. - /// A new instance for mocking. - public static SourceUploadDefinition SourceUploadDefinition(Uri uploadUri = null, string relativePath = null) - { - return new SourceUploadDefinition(uploadUri, relativePath, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The link to logs for a run on a azure container registry. /// The link to logs in registry for a run on a azure container registry. @@ -1069,54 +1078,106 @@ public static ContainerRegistryDockerBuildStep ContainerRegistryDockerBuildStep( arguments?.ToList()); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// List of base image dependencies for a step. /// The URL(absolute or relative) of the source context for the task step. /// The token (git PAT or SAS token of storage account blob) associated with the context for a step. - /// The task template/definition file path relative to the source context. - /// The task values/parameters file path relative to the source context. + /// Base64 encoded value of the template/definition file content. + /// Base64 encoded value of the parameters/values file content. /// The collection of overridable values that can be passed when running a task. - /// A new instance for mocking. - public static ContainerRegistryFileTaskStep ContainerRegistryFileTaskStep(IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string taskFilePath = null, string valuesFilePath = null, IEnumerable values = null) + /// A new instance for mocking. + public static ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep(IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string encodedTaskContent = null, string encodedValuesContent = null, IEnumerable values = null) { baseImageDependencies ??= new List(); values ??= new List(); - return new ContainerRegistryFileTaskStep( - ContainerRegistryTaskStepType.FileTask, + return new ContainerRegistryEncodedTaskStep( + ContainerRegistryTaskStepType.EncodedTask, baseImageDependencies?.ToList(), contextPath, contextAccessToken, serializedAdditionalRawData: null, - taskFilePath, - valuesFilePath, + encodedTaskContent, + encodedValuesContent, values?.ToList()); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// List of base image dependencies for a step. /// The URL(absolute or relative) of the source context for the task step. /// The token (git PAT or SAS token of storage account blob) associated with the context for a step. - /// Base64 encoded value of the template/definition file content. - /// Base64 encoded value of the parameters/values file content. + /// The task template/definition file path relative to the source context. + /// The task values/parameters file path relative to the source context. /// The collection of overridable values that can be passed when running a task. - /// A new instance for mocking. - public static ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep(IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string encodedTaskContent = null, string encodedValuesContent = null, IEnumerable values = null) + /// A new instance for mocking. + public static ContainerRegistryFileTaskStep ContainerRegistryFileTaskStep(IEnumerable baseImageDependencies = null, string contextPath = null, string contextAccessToken = null, string taskFilePath = null, string valuesFilePath = null, IEnumerable values = null) { baseImageDependencies ??= new List(); values ??= new List(); - return new ContainerRegistryEncodedTaskStep( - ContainerRegistryTaskStepType.EncodedTask, + return new ContainerRegistryFileTaskStep( + ContainerRegistryTaskStepType.FileTask, baseImageDependencies?.ToList(), contextPath, contextAccessToken, serializedAdditionalRawData: null, - encodedTaskContent, - encodedValuesContent, + taskFilePath, + valuesFilePath, values?.ToList()); } + /// Initializes a new instance of . + /// The name of the container registry. + /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerRegistryNameAvailabilityContent ContainerRegistryNameAvailabilityContent(string name, ContainerRegistryResourceType resourceType) + { + return ContainerRegistryNameAvailabilityContent(name: name, resourceType: resourceType, resourceGroupName: default, autoGeneratedDomainNameLabelScope: default); + } + + /// Initializes a new instance of . + /// The value that indicates whether the name is available. + /// If any, the reason that the name is not available. + /// If any, the error message that provides more detail for the reason that the name is not available. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerRegistryNameAvailableResult ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message) + { + return ContainerRegistryNameAvailableResult(availableLoginServerName: default, isNameAvailable: isNameAvailable, reason: reason, message: message); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The SKU of the container registry. + /// The identity of the container registry. + /// The URL that can be used to log into the container registry. + /// The creation date of the container registry in ISO8601 format. + /// The provisioning state of the container registry at the time the operation was called. + /// The status of the container registry at the time the operation was called. + /// The value that indicates whether the admin user is enabled. + /// The network rule set for a container registry. + /// The policies for a container registry. + /// The encryption settings of container registry. + /// Enable a single data endpoint per region for serving data. + /// List of host names that will serve data when dataEndpointEnabled is true. + /// List of private endpoint connections for a container registry. + /// Whether or not public network access is allowed for the container registry. + /// Whether to allow trusted Azure services to access a network restricted registry. + /// Whether or not zone redundancy is enabled for this container registry. + /// Enables registry-wide pull from unauthenticated clients. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IEnumerable dataEndpointHostNames, IEnumerable privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled) + { + return ContainerRegistryData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, identity: identity, loginServer: loginServer, createdOn: createdOn, provisioningState: provisioningState, status: status, isAdminUserEnabled: isAdminUserEnabled, networkRuleSet: networkRuleSet, policies: policies, encryption: encryption, isDataEndpointEnabled: isDataEndpointEnabled, dataEndpointHostNames: dataEndpointHostNames, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: publicNetworkAccess, networkRuleBypassOptions: networkRuleBypassOptions, networkRuleBypassAllowedForTasks: default, zoneRedundancy: zoneRedundancy, isAnonymousPullEnabled: isAnonymousPullEnabled, autoGeneratedDomainNameLabelScope: default, roleAssignmentMode: default); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -1144,7 +1205,7 @@ public static ContainerRegistryEncodedTaskStep ContainerRegistryEncodedTaskStep( [EditorBrowsable(EditorBrowsableState.Never)] public static ContainerRegistryData ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IEnumerable dataEndpointHostNames, IEnumerable privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, ContainerRegistryZoneRedundancy? zoneRedundancy) { - return ContainerRegistryData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, identity: identity, loginServer: loginServer, createdOn: createdOn, provisioningState: provisioningState, status: status, isAdminUserEnabled: isAdminUserEnabled, networkRuleSet: networkRuleSet, policies: policies, encryption: encryption, isDataEndpointEnabled: isDataEndpointEnabled, dataEndpointHostNames: dataEndpointHostNames, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: publicNetworkAccess, networkRuleBypassOptions: networkRuleBypassOptions, zoneRedundancy: zoneRedundancy, isAnonymousPullEnabled: default); + return ContainerRegistryData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, identity: identity, loginServer: loginServer, createdOn: createdOn, provisioningState: provisioningState, status: status, isAdminUserEnabled: isAdminUserEnabled, networkRuleSet: networkRuleSet, policies: policies, encryption: encryption, isDataEndpointEnabled: isDataEndpointEnabled, dataEndpointHostNames: dataEndpointHostNames, privateEndpointConnections: privateEndpointConnections, publicNetworkAccess: publicNetworkAccess, networkRuleBypassOptions: networkRuleBypassOptions, networkRuleBypassAllowedForTasks: default, zoneRedundancy: zoneRedundancy, isAnonymousPullEnabled: default, autoGeneratedDomainNameLabelScope: default, roleAssignmentMode: default); } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs index 80c59dc5486f..3a579e582fdf 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string c /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connectedRegistryN /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string connectedRegistryNa /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string connectedRegistryName, CancellationT /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs index 2108020d2e5f..df71c14cff4d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.Serialization.cs @@ -158,7 +158,7 @@ internal static ConnectedRegistryData DeserializeConnectedRegistryData(JsonEleme string version = default; ConnectedRegistryConnectionState? connectionState = default; DateTimeOffset? lastActivityTime = default; - ConnectedRegistryPropertiesActivation activation = default; + ConnectedRegistryActivation activation = default; ConnectedRegistryParent parent = default; IList clientTokenIds = default; ConnectedRegistryLoginServer loginServer = default; @@ -250,7 +250,7 @@ internal static ConnectedRegistryData DeserializeConnectedRegistryData(JsonEleme { continue; } - activation = ConnectedRegistryPropertiesActivation.DeserializeConnectedRegistryPropertiesActivation(property0.Value, options); + activation = ConnectedRegistryActivation.DeserializeConnectedRegistryActivation(property0.Value, options); continue; } if (property0.NameEquals("parent"u8)) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs index 30fc1097128c..d45939008e2b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryData.cs @@ -69,8 +69,8 @@ public ConnectedRegistryData() /// The current version of ACR runtime on the connected registry. /// The current connection state of the connected registry. /// The last activity time of the connected registry. - /// - /// The properties of the connected registry parent. + /// The activation properties of the connected registry. + /// The parent of the connected registry. /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. /// The login server properties of the connected registry. /// The logging properties of the connected registry. @@ -78,7 +78,7 @@ public ConnectedRegistryData() /// The list of notifications subscription information for the connected registry. /// The garbage collection properties of the connected registry. /// Keeps track of any properties unknown to the library. - internal ConnectedRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ContainerRegistryProvisioningState? provisioningState, ConnectedRegistryMode? mode, string version, ConnectedRegistryConnectionState? connectionState, DateTimeOffset? lastActivityOn, ConnectedRegistryPropertiesActivation activation, ConnectedRegistryParent parent, IList clientTokenIds, ConnectedRegistryLoginServer loginServer, ConnectedRegistryLogging logging, IReadOnlyList statusDetails, IList notificationsList, GarbageCollectionProperties garbageCollection, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ConnectedRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ContainerRegistryProvisioningState? provisioningState, ConnectedRegistryMode? mode, string version, ConnectedRegistryConnectionState? connectionState, DateTimeOffset? lastActivityOn, ConnectedRegistryActivation activation, ConnectedRegistryParent parent, IList clientTokenIds, ConnectedRegistryLoginServer loginServer, ConnectedRegistryLogging logging, IReadOnlyList statusDetails, IList notificationsList, GarbageCollectionProperties garbageCollection, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; Mode = mode; @@ -111,8 +111,8 @@ internal ConnectedRegistryData(ResourceIdentifier id, string name, ResourceType /// The last activity time of the connected registry. [WirePath("properties.lastActivityTime")] public DateTimeOffset? LastActivityOn { get; } - /// Gets the activation. - internal ConnectedRegistryPropertiesActivation Activation { get; } + /// The activation properties of the connected registry. + internal ConnectedRegistryActivation Activation { get; } /// The activation status of the connected registry. [WirePath("properties.activation.status")] public ConnectedRegistryActivationStatus? ActivationStatus @@ -120,7 +120,7 @@ public ConnectedRegistryActivationStatus? ActivationStatus get => Activation?.Status; } - /// The properties of the connected registry parent. + /// The parent of the connected registry. [WirePath("properties.parent")] public ConnectedRegistryParent Parent { get; set; } /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs index c8be909c06cf..7d9eee6a5427 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task DeactivateAsync(WaitUntil waitUntil, Can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolCollection.cs index b6d53bd95218..cb53723cc4d1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -88,7 +88,7 @@ public virtual async Task> Crea try { var response = await _containerRegistryAgentPoolAgentPoolsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,7 +113,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(W try { var response = _containerRegistryAgentPoolAgentPoolsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string agentPool /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string agentPoolName, Canc /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string agentPoolName, CancellationToken can /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.cs index 81c919c9628e..7ba0c254944e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> Upda try { var response = await _containerRegistryAgentPoolAgentPoolsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -313,7 +313,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Update(WaitUntil try { var response = _containerRegistryAgentPoolAgentPoolsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryAgentPoolOperationSource(Client), _containerRegistryAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerRegistryAgentPoolAgentPoolsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> GetQu /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,7 +435,7 @@ public virtual Response GetQueueStatus(Ca /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -497,7 +497,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -559,7 +559,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -616,7 +616,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -673,7 +673,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -733,7 +733,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs index edee44a67e74..66047feccc0f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string cacheRule /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string cacheRuleName, Canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string cacheRuleName, CancellationToken can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs index c678eee7fb9b..aa8854f396d3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs index 61a650d420a9..f1a18ddb6dc4 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string r /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string registryName, Canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string registryName, Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string registryName, CancellationToken canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs index 9557fe1e0d76..6a8e47669207 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string crede /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string credentialSetName, /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string credentialSetName, CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs index f0cfd4a45b2c..6e801bd20c6c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs index 640a65997157..3c609eeea8e1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.Serialization.cs @@ -123,6 +123,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("networkRuleBypassOptions"u8); writer.WriteStringValue(NetworkRuleBypassOptions.Value.ToString()); } + if (Optional.IsDefined(NetworkRuleBypassAllowedForTasks)) + { + writer.WritePropertyName("networkRuleBypassAllowedForTasks"u8); + writer.WriteBooleanValue(NetworkRuleBypassAllowedForTasks.Value); + } if (Optional.IsDefined(ZoneRedundancy)) { writer.WritePropertyName("zoneRedundancy"u8); @@ -133,6 +138,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("anonymousPullEnabled"u8); writer.WriteBooleanValue(IsAnonymousPullEnabled.Value); } + if (Optional.IsDefined(AutoGeneratedDomainNameLabelScope)) + { + writer.WritePropertyName("autoGeneratedDomainNameLabelScope"u8); + writer.WriteStringValue(AutoGeneratedDomainNameLabelScope.Value.ToString()); + } + if (Optional.IsDefined(RoleAssignmentMode)) + { + writer.WritePropertyName("roleAssignmentMode"u8); + writer.WriteStringValue(RoleAssignmentMode.Value.ToString()); + } writer.WriteEndObject(); } @@ -177,8 +192,11 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme IReadOnlyList privateEndpointConnections = default; ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default; ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default; + bool? networkRuleBypassAllowedForTasks = default; ContainerRegistryZoneRedundancy? zoneRedundancy = default; bool? anonymousPullEnabled = default; + AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; + ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -372,6 +390,15 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme networkRuleBypassOptions = new ContainerRegistryNetworkRuleBypassOption(property0.Value.GetString()); continue; } + if (property0.NameEquals("networkRuleBypassAllowedForTasks"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkRuleBypassAllowedForTasks = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("zoneRedundancy"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -390,6 +417,24 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme anonymousPullEnabled = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("autoGeneratedDomainNameLabelScope"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoGeneratedDomainNameLabelScope = new AutoGeneratedDomainNameLabelScope(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("roleAssignmentMode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + roleAssignmentMode = new ContainerRegistryRoleAssignmentMode(property0.Value.GetString()); + continue; + } } continue; } @@ -421,8 +466,11 @@ internal static ContainerRegistryData DeserializeContainerRegistryData(JsonEleme privateEndpointConnections ?? new ChangeTrackingList(), publicNetworkAccess, networkRuleBypassOptions, + networkRuleBypassAllowedForTasks, zoneRedundancy, anonymousPullEnabled, + autoGeneratedDomainNameLabelScope, + roleAssignmentMode, serializedAdditionalRawData); } @@ -806,6 +854,22 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkRuleBypassAllowedForTasks), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkRuleBypassAllowedForTasks: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkRuleBypassAllowedForTasks)) + { + builder.Append(" networkRuleBypassAllowedForTasks: "); + var boolValue = NetworkRuleBypassAllowedForTasks.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ZoneRedundancy), out propertyOverride); if (hasPropertyOverride) { @@ -837,6 +901,36 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AutoGeneratedDomainNameLabelScope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" autoGeneratedDomainNameLabelScope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AutoGeneratedDomainNameLabelScope)) + { + builder.Append(" autoGeneratedDomainNameLabelScope: "); + builder.AppendLine($"'{AutoGeneratedDomainNameLabelScope.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RoleAssignmentMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" roleAssignmentMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RoleAssignmentMode)) + { + builder.Append(" roleAssignmentMode: "); + builder.AppendLine($"'{RoleAssignmentMode.Value.ToString()}'"); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs index 5a71a85d65f4..acf883d4207f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryData.cs @@ -86,10 +86,13 @@ public ContainerRegistryData(AzureLocation location, ContainerRegistrySku sku) : /// List of private endpoint connections for a container registry. /// Whether or not public network access is allowed for the container registry. /// Whether to allow trusted Azure services to access a network restricted registry. + /// Whether or not Tasks allowed to bypass the network rules for this container registry. /// Whether or not zone redundancy is enabled for this container registry. /// Enables registry-wide pull from unauthenticated clients. + /// Determines the domain name label reuse scope. + /// Determines registry role assignment mode. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IReadOnlyList dataEndpointHostNames, IReadOnlyList privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ContainerRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerRegistrySku sku, ManagedServiceIdentity identity, string loginServer, DateTimeOffset? createdOn, ContainerRegistryProvisioningState? provisioningState, ContainerRegistryResourceStatus status, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, IReadOnlyList dataEndpointHostNames, IReadOnlyList privateEndpointConnections, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, bool? networkRuleBypassAllowedForTasks, ContainerRegistryZoneRedundancy? zoneRedundancy, bool? isAnonymousPullEnabled, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, ContainerRegistryRoleAssignmentMode? roleAssignmentMode, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -106,8 +109,11 @@ internal ContainerRegistryData(ResourceIdentifier id, string name, ResourceType PrivateEndpointConnections = privateEndpointConnections; PublicNetworkAccess = publicNetworkAccess; NetworkRuleBypassOptions = networkRuleBypassOptions; + NetworkRuleBypassAllowedForTasks = networkRuleBypassAllowedForTasks; ZoneRedundancy = zoneRedundancy; IsAnonymousPullEnabled = isAnonymousPullEnabled; + AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; + RoleAssignmentMode = roleAssignmentMode; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -161,11 +167,20 @@ internal ContainerRegistryData() /// Whether to allow trusted Azure services to access a network restricted registry. [WirePath("properties.networkRuleBypassOptions")] public ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get; set; } + /// Whether or not Tasks allowed to bypass the network rules for this container registry. + [WirePath("properties.networkRuleBypassAllowedForTasks")] + public bool? NetworkRuleBypassAllowedForTasks { get; set; } /// Whether or not zone redundancy is enabled for this container registry. [WirePath("properties.zoneRedundancy")] public ContainerRegistryZoneRedundancy? ZoneRedundancy { get; set; } /// Enables registry-wide pull from unauthenticated clients. [WirePath("properties.anonymousPullEnabled")] public bool? IsAnonymousPullEnabled { get; set; } + /// Determines the domain name label reuse scope. + [WirePath("properties.autoGeneratedDomainNameLabelScope")] + public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } + /// Determines registry role assignment mode. + [WirePath("properties.roleAssignmentMode")] + public ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get; set; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs index 7f63a61eb6f9..b58faec3986b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get( /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetA /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs index 75bcbac5f805..ef7f08e50bca 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get( /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs index a3f1751b60b2..a8782e57825c 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs index 9028c36e88df..e6f83c7ccf79 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -72,7 +72,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -109,7 +109,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> GetAsy /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -154,7 +154,7 @@ public virtual Response Get(string groupNa /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string groupName, Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual async Task> ExistsAsync(string groupName, Cancella /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual Response Exists(string groupName, CancellationToken cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response Exists(string groupName, CancellationToken cancell /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -345,7 +345,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task /// /// /// - /// The name of the private link resource. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs index 4b6ed2e4fea6..c0ad4d935dab 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.Serialization.cs @@ -40,12 +40,12 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsDefined(GroupId)) + if (options.Format != "W" && Optional.IsDefined(GroupId)) { writer.WritePropertyName("groupId"u8); writer.WriteStringValue(GroupId); } - if (Optional.IsCollectionDefined(RequiredMembers)) + if (options.Format != "W" && Optional.IsCollectionDefined(RequiredMembers)) { writer.WritePropertyName("requiredMembers"u8); writer.WriteStartArray(); @@ -55,11 +55,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(RequiredZoneNames)) + if (Optional.IsCollectionDefined(RequiredPrivateLinkZoneNames)) { writer.WritePropertyName("requiredZoneNames"u8); writer.WriteStartArray(); - foreach (var item in RequiredZoneNames) + foreach (var item in RequiredPrivateLinkZoneNames) { writer.WriteStringValue(item); } @@ -94,7 +94,7 @@ internal static ContainerRegistryPrivateLinkResourceData DeserializeContainerReg SystemData systemData = default; string groupId = default; IReadOnlyList requiredMembers = default; - IReadOnlyList requiredZoneNames = default; + IList requiredZoneNames = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -310,7 +310,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequiredZoneNames), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequiredPrivateLinkZoneNames), out propertyOverride); if (hasPropertyOverride) { builder.Append(" requiredZoneNames: "); @@ -318,13 +318,13 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsCollectionDefined(RequiredZoneNames)) + if (Optional.IsCollectionDefined(RequiredPrivateLinkZoneNames)) { - if (RequiredZoneNames.Any()) + if (RequiredPrivateLinkZoneNames.Any()) { builder.Append(" requiredZoneNames: "); builder.AppendLine("["); - foreach (var item in RequiredZoneNames) + foreach (var item in RequiredPrivateLinkZoneNames) { if (item == null) { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.cs index 6121f4c5d7cb..273a66c9e463 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResourceData.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ContainerRegistry { /// /// A class representing the ContainerRegistryPrivateLinkResource data model. - /// A resource that supports private link capabilities. + /// A private link resource. /// public partial class ContainerRegistryPrivateLinkResourceData : ResourceData { @@ -51,10 +51,10 @@ public partial class ContainerRegistryPrivateLinkResourceData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerRegistryPrivateLinkResourceData() + public ContainerRegistryPrivateLinkResourceData() { RequiredMembers = new ChangeTrackingList(); - RequiredZoneNames = new ChangeTrackingList(); + RequiredPrivateLinkZoneNames = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -64,13 +64,13 @@ internal ContainerRegistryPrivateLinkResourceData() /// The systemData. /// The private link resource group id. /// The private link resource required member names. - /// The private link resource Private link DNS zone name. + /// The private link resource private link DNS zone name. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string groupId, IReadOnlyList requiredMembers, IReadOnlyList requiredZoneNames, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ContainerRegistryPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string groupId, IReadOnlyList requiredMembers, IList requiredPrivateLinkZoneNames, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { GroupId = groupId; RequiredMembers = requiredMembers; - RequiredZoneNames = requiredZoneNames; + RequiredPrivateLinkZoneNames = requiredPrivateLinkZoneNames; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -80,8 +80,8 @@ internal ContainerRegistryPrivateLinkResourceData(ResourceIdentifier id, string /// The private link resource required member names. [WirePath("properties.requiredMembers")] public IReadOnlyList RequiredMembers { get; } - /// The private link resource Private link DNS zone name. + /// The private link resource private link DNS zone name. [WirePath("properties.requiredZoneNames")] - public IReadOnlyList RequiredZoneNames { get; } + public IList RequiredPrivateLinkZoneNames { get; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs index 09d6834f91ae..887154bfbb8e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string replica /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string replicationName, Ca /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string replicationName, CancellationToken c /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs index 73a0703a0904..63d8af3aa6fd 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task> AddTag /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> SetTag /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response SetTags(IDictionar /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task> Remove /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs index a6cfcf1c5130..6f7817fea78b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.cs @@ -38,10 +38,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _containerRegistryRegistriesClientDiagnostics; private readonly RegistriesRestOperations _containerRegistryRegistriesRestClient; - private readonly ClientDiagnostics _schedulesClientDiagnostics; - private readonly SchedulesRestOperations _schedulesRestClient; private readonly ClientDiagnostics _buildsClientDiagnostics; private readonly BuildsRestOperations _buildsRestClient; + private readonly ClientDiagnostics _schedulesClientDiagnostics; + private readonly SchedulesRestOperations _schedulesRestClient; private readonly ContainerRegistryData _data; /// Gets the resource type for the operations. @@ -69,10 +69,10 @@ internal ContainerRegistryResource(ArmClient client, ResourceIdentifier id) : ba _containerRegistryRegistriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string containerRegistryRegistriesApiVersion); _containerRegistryRegistriesRestClient = new RegistriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerRegistryRegistriesApiVersion); - _schedulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _schedulesRestClient = new SchedulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _buildsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ProviderConstants.DefaultProviderNamespace, Diagnostics); _buildsRestClient = new BuildsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _schedulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerRegistry", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _schedulesRestClient = new SchedulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -99,6 +99,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of ContainerRegistryPrivateLinkResources in the ContainerRegistry. + /// An object representing collection of ContainerRegistryPrivateLinkResources and their operations over a ContainerRegistryPrivateLinkResource. + public virtual ContainerRegistryPrivateLinkResourceCollection GetContainerRegistryPrivateLinkResources() + { + return GetCachedClient(client => new ContainerRegistryPrivateLinkResourceCollection(client, Id)); + } + + /// + /// Gets a private link resource by a specified group name for a container registry. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// Registries_GetPrivateLinkResource + /// + /// + /// Default Api Version + /// 2025-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link associated with the Azure resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetContainerRegistryPrivateLinkResourceAsync(string groupName, CancellationToken cancellationToken = default) + { + return await GetContainerRegistryPrivateLinkResources().GetAsync(groupName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a private link resource by a specified group name for a container registry. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName} + /// + /// + /// Operation Id + /// Registries_GetPrivateLinkResource + /// + /// + /// Default Api Version + /// 2025-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private link associated with the Azure resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetContainerRegistryPrivateLinkResource(string groupName, CancellationToken cancellationToken = default) + { + return GetContainerRegistryPrivateLinkResources().Get(groupName, cancellationToken); + } + /// Gets a collection of ContainerRegistryCacheRuleResources in the ContainerRegistry. /// An object representing collection of ContainerRegistryCacheRuleResources and their operations over a ContainerRegistryCacheRuleResource. public virtual ContainerRegistryCacheRuleCollection GetContainerRegistryCacheRules() @@ -119,7 +188,7 @@ public virtual ContainerRegistryCacheRuleCollection GetContainerRegistryCacheRul /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -150,7 +219,7 @@ public virtual async Task> GetConta /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -188,7 +257,7 @@ public virtual ConnectedRegistryCollection GetConnectedRegistries() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -219,7 +288,7 @@ public virtual async Task> GetConnectedRegis /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -257,7 +326,7 @@ public virtual ContainerRegistryCredentialSetCollection GetContainerRegistryCred /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -288,7 +357,7 @@ public virtual async Task> GetC /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -306,75 +375,6 @@ public virtual Response GetContainerRegi return GetContainerRegistryCredentialSets().Get(credentialSetName, cancellationToken); } - /// Gets a collection of ContainerRegistryPrivateLinkResources in the ContainerRegistry. - /// An object representing collection of ContainerRegistryPrivateLinkResources and their operations over a ContainerRegistryPrivateLinkResource. - public virtual ContainerRegistryPrivateLinkResourceCollection GetContainerRegistryPrivateLinkResources() - { - return GetCachedClient(client => new ContainerRegistryPrivateLinkResourceCollection(client, Id)); - } - - /// - /// Gets a private link resource by a specified group name for a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// Registries_GetPrivateLinkResource - /// - /// - /// Default Api Version - /// 2025-04-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetContainerRegistryPrivateLinkResourceAsync(string groupName, CancellationToken cancellationToken = default) - { - return await GetContainerRegistryPrivateLinkResources().GetAsync(groupName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a private link resource by a specified group name for a container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources/{groupName} - /// - /// - /// Operation Id - /// Registries_GetPrivateLinkResource - /// - /// - /// Default Api Version - /// 2025-04-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetContainerRegistryPrivateLinkResource(string groupName, CancellationToken cancellationToken = default) - { - return GetContainerRegistryPrivateLinkResources().Get(groupName, cancellationToken); - } - /// Gets a collection of ContainerRegistryPrivateEndpointConnectionResources in the ContainerRegistry. /// An object representing collection of ContainerRegistryPrivateEndpointConnectionResources and their operations over a ContainerRegistryPrivateEndpointConnectionResource. public virtual ContainerRegistryPrivateEndpointConnectionCollection GetContainerRegistryPrivateEndpointConnections() @@ -395,7 +395,7 @@ public virtual ContainerRegistryPrivateEndpointConnectionCollection GetContainer /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -426,7 +426,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -464,7 +464,7 @@ public virtual ContainerRegistryReplicationCollection GetContainerRegistryReplic /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -495,7 +495,7 @@ public virtual async Task> GetCon /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -533,7 +533,7 @@ public virtual ScopeMapCollection GetScopeMaps() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -564,7 +564,7 @@ public virtual async Task> GetScopeMapAsync(string sc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -602,7 +602,7 @@ public virtual ContainerRegistryTokenCollection GetContainerRegistryTokens() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -633,7 +633,7 @@ public virtual async Task> GetContainer /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -671,7 +671,7 @@ public virtual ContainerRegistryWebhookCollection GetContainerRegistryWebhooks() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -702,7 +702,7 @@ public virtual async Task> GetContain /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -740,7 +740,7 @@ public virtual ContainerRegistryAgentPoolCollection GetContainerRegistryAgentPoo /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -771,7 +771,7 @@ public virtual async Task> GetConta /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -809,7 +809,7 @@ public virtual ContainerRegistryRunCollection GetContainerRegistryRuns() /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -840,7 +840,7 @@ public virtual async Task> GetContainerRe /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -878,7 +878,7 @@ public virtual ContainerRegistryTaskRunCollection GetContainerRegistryTaskRuns() /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -909,7 +909,7 @@ public virtual async Task> GetContain /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -947,7 +947,7 @@ public virtual ContainerRegistryTaskCollection GetContainerRegistryTasks() /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -978,7 +978,7 @@ public virtual async Task> GetContainerR /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -1009,7 +1009,7 @@ public virtual Response GetContainerRegistryTask( /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1049,7 +1049,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1089,7 +1089,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1131,7 +1131,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1173,7 +1173,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1219,7 +1219,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1253,19 +1253,19 @@ public virtual ArmOperation Update(WaitUntil waitUnti } /// - /// Copies an image to this container registry from the specified container registry. + /// Generate keys for a token of a specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials /// /// /// Operation Id - /// Registries_ImportImage + /// Registries_GenerateCredentials /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1274,21 +1274,21 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters specifying the image to copy and the source container registry. + /// The parameters for generating credentials. /// The cancellation token to use. /// is null. - public virtual async Task ImportImageAsync(WaitUntil waitUntil, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) + public virtual async Task> GenerateCredentialsAsync(WaitUntil waitUntil, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.ImportImage"); + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.GenerateCredentials"); scope.Start(); try { - var response = await _containerRegistryRegistriesRestClient.ImportImageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateImportImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _containerRegistryRegistriesRestClient.GenerateCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryGenerateCredentialsResultOperationSource(), _containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateGenerateCredentialsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -1299,19 +1299,19 @@ public virtual async Task ImportImageAsync(WaitUntil waitUntil, Co } /// - /// Copies an image to this container registry from the specified container registry. + /// Generate keys for a token of a specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials /// /// /// Operation Id - /// Registries_ImportImage + /// Registries_GenerateCredentials /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1320,21 +1320,21 @@ public virtual async Task ImportImageAsync(WaitUntil waitUntil, Co /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters specifying the image to copy and the source container registry. + /// The parameters for generating credentials. /// The cancellation token to use. /// is null. - public virtual ArmOperation ImportImage(WaitUntil waitUntil, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation GenerateCredentials(WaitUntil waitUntil, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.ImportImage"); + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.GenerateCredentials"); scope.Start(); try { - var response = _containerRegistryRegistriesRestClient.ImportImage(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateImportImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _containerRegistryRegistriesRestClient.GenerateCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryGenerateCredentialsResultOperationSource(), _containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateGenerateCredentialsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -1345,19 +1345,19 @@ public virtual ArmOperation ImportImage(WaitUntil waitUntil, ContainerRegistryIm } /// - /// Gets the quota usages for the specified container registry. + /// Copies an image to this container registry from the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage /// /// /// Operation Id - /// Registries_ListUsages + /// Registries_ImportImage /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1365,28 +1365,45 @@ public virtual ArmOperation ImportImage(WaitUntil waitUntil, ContainerRegistryIm /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters specifying the image to copy and the source container registry. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetUsagesAsync(CancellationToken cancellationToken = default) + /// is null. + public virtual async Task ImportImageAsync(WaitUntil waitUntil, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryRegistriesRestClient.CreateListUsagesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ContainerRegistryUsage.DeserializeContainerRegistryUsage(e), _containerRegistryRegistriesClientDiagnostics, Pipeline, "ContainerRegistryResource.GetUsages", "value", null, cancellationToken); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.ImportImage"); + scope.Start(); + try + { + var response = await _containerRegistryRegistriesRestClient.ImportImageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ContainerRegistryArmOperation(_containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateImportImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Gets the quota usages for the specified container registry. + /// Copies an image to this container registry from the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage /// /// /// Operation Id - /// Registries_ListUsages + /// Registries_ImportImage /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1394,12 +1411,29 @@ public virtual AsyncPageable GetUsagesAsync(Cancellation /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameters specifying the image to copy and the source container registry. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetUsages(CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ImportImage(WaitUntil waitUntil, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryRegistriesRestClient.CreateListUsagesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ContainerRegistryUsage.DeserializeContainerRegistryUsage(e), _containerRegistryRegistriesClientDiagnostics, Pipeline, "ContainerRegistryResource.GetUsages", "value", null, cancellationToken); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.ImportImage"); + scope.Start(); + try + { + var response = _containerRegistryRegistriesRestClient.ImportImage(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ContainerRegistryArmOperation(_containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateImportImageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// @@ -1415,7 +1449,7 @@ public virtual Pageable GetUsages(CancellationToken canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1453,7 +1487,7 @@ public virtual async Task> GetC /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1479,19 +1513,19 @@ public virtual Response GetCredentials(C } /// - /// Regenerates one of the login credentials for the specified container registry. + /// Gets the quota usages for the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages /// /// /// Operation Id - /// Registries_RegenerateCredential + /// Registries_ListUsages /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1499,41 +1533,28 @@ public virtual Response GetCredentials(C /// /// /// - /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. - /// is null. - public virtual async Task> RegenerateCredentialAsync(ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetUsagesAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.RegenerateCredential"); - scope.Start(); - try - { - var response = await _containerRegistryRegistriesRestClient.RegenerateCredentialAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryRegistriesRestClient.CreateListUsagesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ContainerRegistryUsage.DeserializeContainerRegistryUsage(e), _containerRegistryRegistriesClientDiagnostics, Pipeline, "ContainerRegistryResource.GetUsages", "value", null, cancellationToken); } /// - /// Regenerates one of the login credentials for the specified container registry. + /// Gets the quota usages for the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages /// /// /// Operation Id - /// Registries_RegenerateCredential + /// Registries_ListUsages /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1541,41 +1562,28 @@ public virtual async Task> Rege /// /// /// - /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. - /// is null. - public virtual Response RegenerateCredential(ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetUsages(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.RegenerateCredential"); - scope.Start(); - try - { - var response = _containerRegistryRegistriesRestClient.RegenerateCredential(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerRegistryRegistriesRestClient.CreateListUsagesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ContainerRegistryUsage.DeserializeContainerRegistryUsage(e), _containerRegistryRegistriesClientDiagnostics, Pipeline, "ContainerRegistryResource.GetUsages", "value", null, cancellationToken); } /// - /// Generate keys for a token of a specified container registry. + /// Regenerates one of the login credentials for the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential /// /// /// Operation Id - /// Registries_GenerateCredentials + /// Registries_RegenerateCredential /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1583,23 +1591,19 @@ public virtual Response RegenerateCreden /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for generating credentials. + /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. /// is null. - public virtual async Task> GenerateCredentialsAsync(WaitUntil waitUntil, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) + public virtual async Task> RegenerateCredentialAsync(ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.GenerateCredentials"); + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.RegenerateCredential"); scope.Start(); try { - var response = await _containerRegistryRegistriesRestClient.GenerateCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryGenerateCredentialsResultOperationSource(), _containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateGenerateCredentialsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _containerRegistryRegistriesRestClient.RegenerateCredentialAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1609,19 +1613,19 @@ public virtual async Task - /// Generate keys for a token of a specified container registry. + /// Regenerates one of the login credentials for the specified container registry. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential /// /// /// Operation Id - /// Registries_GenerateCredentials + /// Registries_RegenerateCredential /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1629,23 +1633,19 @@ public virtual async Task /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for generating credentials. + /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. /// is null. - public virtual ArmOperation GenerateCredentials(WaitUntil waitUntil, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) + public virtual Response RegenerateCredential(ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.GenerateCredentials"); + using var scope = _containerRegistryRegistriesClientDiagnostics.CreateScope("ContainerRegistryResource.RegenerateCredential"); scope.Start(); try { - var response = _containerRegistryRegistriesRestClient.GenerateCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryGenerateCredentialsResultOperationSource(), _containerRegistryRegistriesClientDiagnostics, Pipeline, _containerRegistryRegistriesRestClient.CreateGenerateCredentialsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + var response = _containerRegistryRegistriesRestClient.RegenerateCredential(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; } catch (Exception e) { @@ -1655,39 +1655,31 @@ public virtual ArmOperation Generate } /// - /// Schedules a new run based on the request parameters and add it to the run queue. + /// Get the upload location for the user to be able to upload the source. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listBuildSourceUploadUrl /// /// /// Operation Id - /// Schedules_ScheduleRun + /// Builds_GetBuildSourceUploadUrl /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters of a run that needs to scheduled. /// The cancellation token to use. - /// is null. - public virtual async Task> ScheduleRunAsync(WaitUntil waitUntil, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) + public virtual async Task> GetBuildSourceUploadUrlAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _schedulesClientDiagnostics.CreateScope("ContainerRegistryResource.ScheduleRun"); + using var scope = _buildsClientDiagnostics.CreateScope("ContainerRegistryResource.GetBuildSourceUploadUrl"); scope.Start(); try { - var response = await _schedulesRestClient.ScheduleRunAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _schedulesClientDiagnostics, Pipeline, _schedulesRestClient.CreateScheduleRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _buildsRestClient.GetBuildSourceUploadUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1697,39 +1689,31 @@ public virtual async Task> ScheduleRu } /// - /// Schedules a new run based on the request parameters and add it to the run queue. + /// Get the upload location for the user to be able to upload the source. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listBuildSourceUploadUrl /// /// /// Operation Id - /// Schedules_ScheduleRun + /// Builds_GetBuildSourceUploadUrl /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters of a run that needs to scheduled. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ScheduleRun(WaitUntil waitUntil, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) + public virtual Response GetBuildSourceUploadUrl(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _schedulesClientDiagnostics.CreateScope("ContainerRegistryResource.ScheduleRun"); + using var scope = _buildsClientDiagnostics.CreateScope("ContainerRegistryResource.GetBuildSourceUploadUrl"); scope.Start(); try { - var response = _schedulesRestClient.ScheduleRun(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _schedulesClientDiagnostics, Pipeline, _schedulesRestClient.CreateScheduleRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + var response = _buildsRestClient.GetBuildSourceUploadUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; } catch (Exception e) { @@ -1739,31 +1723,35 @@ public virtual ArmOperation ScheduleRun(WaitUntil } /// - /// Get the upload location for the user to be able to upload the source. + /// Schedules a new run based on the request parameters and add it to the run queue. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listBuildSourceUploadUrl + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun /// /// /// Operation Id - /// Builds_GetBuildSourceUploadUrl + /// Schedules_ScheduleRun /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// + /// The request body. /// The cancellation token to use. - public virtual async Task> GetBuildSourceUploadUrlAsync(CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ScheduleRunAsync(ContainerRegistryRunContent content, CancellationToken cancellationToken = default) { - using var scope = _buildsClientDiagnostics.CreateScope("ContainerRegistryResource.GetBuildSourceUploadUrl"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _schedulesClientDiagnostics.CreateScope("ContainerRegistryResource.ScheduleRun"); scope.Start(); try { - var response = await _buildsRestClient.GetBuildSourceUploadUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; + var response = await _schedulesRestClient.ScheduleRunAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ContainerRegistryRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -1773,31 +1761,35 @@ public virtual async Task> GetBuildSourceUpload } /// - /// Get the upload location for the user to be able to upload the source. + /// Schedules a new run based on the request parameters and add it to the run queue. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listBuildSourceUploadUrl + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scheduleRun /// /// /// Operation Id - /// Builds_GetBuildSourceUploadUrl + /// Schedules_ScheduleRun /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// + /// The request body. /// The cancellation token to use. - public virtual Response GetBuildSourceUploadUrl(CancellationToken cancellationToken = default) + /// is null. + public virtual Response ScheduleRun(ContainerRegistryRunContent content, CancellationToken cancellationToken = default) { - using var scope = _buildsClientDiagnostics.CreateScope("ContainerRegistryResource.GetBuildSourceUploadUrl"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _schedulesClientDiagnostics.CreateScope("ContainerRegistryResource.ScheduleRun"); scope.Start(); try { - var response = _buildsRestClient.GetBuildSourceUploadUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; + var response = _schedulesRestClient.ScheduleRun(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return Response.FromValue(new ContainerRegistryRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -1819,7 +1811,7 @@ public virtual Response GetBuildSourceUploadUrl(Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1881,7 +1873,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -1943,7 +1935,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -2000,7 +1992,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -2057,7 +2049,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -2117,7 +2109,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunCollection.cs index b517765dba19..8a4f36eea6e3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string runId, Cancella /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -186,7 +186,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string runId, Cancellation /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string runId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.cs index 5317e7ba7596..0a864b2077c2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -190,11 +190,10 @@ public virtual Response Get(CancellationToken canc /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The run update properties. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -203,10 +202,7 @@ public virtual async Task> UpdateAsyn try { var response = await _containerRegistryRunRunsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + return Response.FromValue(new ContainerRegistryRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -228,7 +224,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -236,11 +232,10 @@ public virtual async Task> UpdateAsyn /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The run update properties. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) + public virtual Response Update(ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -249,10 +244,7 @@ public virtual ArmOperation Update(WaitUntil waitU try { var response = _containerRegistryRunRunsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryRunOperationSource(Client), _containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + return Response.FromValue(new ContainerRegistryRunResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -262,19 +254,19 @@ public virtual ArmOperation Update(WaitUntil waitU } /// - /// Gets a link to download the run logs. + /// Cancel an existing run. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/listLogSasUrl + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel /// /// /// Operation Id - /// Runs_GetLogSasUrl + /// Runs_Cancel /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -283,13 +275,13 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// The cancellation token to use. - public virtual async Task> GetLogSasUrlAsync(CancellationToken cancellationToken = default) + public virtual async Task CancelAsync(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.GetLogSasUrl"); + using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Cancel"); scope.Start(); try { - var response = await _containerRegistryRunRunsRestClient.GetLogSasUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _containerRegistryRunRunsRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -300,19 +292,19 @@ public virtual async Task> GetLogSasU } /// - /// Gets a link to download the run logs. + /// Cancel an existing run. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/listLogSasUrl + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel /// /// /// Operation Id - /// Runs_GetLogSasUrl + /// Runs_Cancel /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -321,13 +313,13 @@ public virtual async Task> GetLogSasU /// /// /// The cancellation token to use. - public virtual Response GetLogSasUrl(CancellationToken cancellationToken = default) + public virtual Response Cancel(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.GetLogSasUrl"); + using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Cancel"); scope.Start(); try { - var response = _containerRegistryRunRunsRestClient.GetLogSasUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _containerRegistryRunRunsRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -338,19 +330,19 @@ public virtual Response GetLogSasUrl(Cancellat } /// - /// Cancel an existing run. + /// Gets a link to download the run logs. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/listLogSasUrl /// /// /// Operation Id - /// Runs_Cancel + /// Runs_GetLogSasUrl /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -358,19 +350,15 @@ public virtual Response GetLogSasUrl(Cancellat /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task CancelAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> GetLogSasUrlAsync(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Cancel"); + using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.GetLogSasUrl"); scope.Start(); try { - var response = await _containerRegistryRunRunsRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.CreateCancelRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _containerRegistryRunRunsRestClient.GetLogSasUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -380,19 +368,19 @@ public virtual async Task CancelAsync(WaitUntil waitUntil, Cancell } /// - /// Cancel an existing run. + /// Gets a link to download the run logs. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/cancel + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}/listLogSasUrl /// /// /// Operation Id - /// Runs_Cancel + /// Runs_GetLogSasUrl /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -400,19 +388,15 @@ public virtual async Task CancelAsync(WaitUntil waitUntil, Cancell /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Cancel(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual Response GetLogSasUrl(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.Cancel"); + using var scope = _containerRegistryRunRunsClientDiagnostics.CreateScope("ContainerRegistryRunResource.GetLogSasUrl"); scope.Start(); try { - var response = _containerRegistryRunRunsRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryRunRunsClientDiagnostics, Pipeline, _containerRegistryRunRunsRestClient.CreateCancelRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; + var response = _containerRegistryRunRunsRestClient.GetLogSasUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; } catch (Exception e) { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskCollection.cs index 82f52bd3f6cd..34c8814cca77 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -88,7 +88,9 @@ public virtual async Task> CreateOrU try { var response = await _containerRegistryTaskTasksRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskOperationSource(Client), _containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data).Request, response, OperationFinalStateVia.Location); + var uri = _containerRegistryTaskTasksRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(Response.FromValue(new ContainerRegistryTaskResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,7 +115,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -137,7 +139,9 @@ public virtual ArmOperation CreateOrUpdate(WaitUn try { var response = _containerRegistryTaskTasksRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskOperationSource(Client), _containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data).Request, response, OperationFinalStateVia.Location); + var uri = _containerRegistryTaskTasksRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(Response.FromValue(new ContainerRegistryTaskResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -162,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -207,7 +211,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -252,7 +256,7 @@ public virtual Response Get(string taskName, Canc /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -282,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -312,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -355,7 +359,7 @@ public virtual async Task> ExistsAsync(string taskName, Cancellat /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -398,7 +402,7 @@ public virtual Response Exists(string taskName, CancellationToken cancella /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -443,7 +447,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.cs index 2d506292885e..7cabea9733aa 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -200,7 +200,9 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _containerRegistryTaskTasksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var uri = _containerRegistryTaskTasksRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(response, rehydrationToken); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -225,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -242,7 +244,9 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _containerRegistryTaskTasksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var uri = _containerRegistryTaskTasksRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(response, rehydrationToken); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -267,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -275,11 +279,10 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The parameters for updating a task. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -288,10 +291,7 @@ public virtual async Task> UpdateAsy try { var response = await _containerRegistryTaskTasksRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskOperationSource(Client), _containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + return Response.FromValue(new ContainerRegistryTaskResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -321,11 +321,10 @@ public virtual async Task> UpdateAsy /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The parameters for updating a task. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) + public virtual Response Update(ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -334,10 +333,7 @@ public virtual ArmOperation Update(WaitUntil wait try { var response = _containerRegistryTaskTasksRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskOperationSource(Client), _containerRegistryTaskTasksClientDiagnostics, Pipeline, _containerRegistryTaskTasksRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + return Response.FromValue(new ContainerRegistryTaskResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -359,7 +355,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -397,7 +393,7 @@ public virtual async Task> GetDetailsAsy /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,7 +431,7 @@ public virtual Response GetDetails(CancellationTo /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -473,8 +469,8 @@ public virtual async Task> AddTagAsync(s patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; } } catch (Exception e) @@ -497,7 +493,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -535,8 +531,8 @@ public virtual Response AddTag(string key, string patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); + var result = Update(patch, cancellationToken: cancellationToken); + return result; } } catch (Exception e) @@ -559,7 +555,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -592,8 +588,8 @@ public virtual async Task> SetTagsAsync( var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; var patch = new ContainerRegistryTaskPatch(); patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; } } catch (Exception e) @@ -616,7 +612,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -649,8 +645,8 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -709,8 +705,8 @@ public virtual async Task> RemoveTagAsyn patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; } } catch (Exception e) @@ -733,7 +729,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -769,8 +765,8 @@ public virtual Response RemoveTag(string key, Can patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); + var result = Update(patch, cancellationToken: cancellationToken); + return result; } } catch (Exception e) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunCollection.cs index ea6cddc68421..fe6922c7fac3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -88,7 +88,7 @@ public virtual async Task> Create try { var response = await _containerRegistryTaskRunTaskRunsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,7 +113,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(Wai try { var response = _containerRegistryTaskRunTaskRunsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, taskRunName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string taskRunName /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string taskRunName, Cancel /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string taskRunName, CancellationToken cance /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.cs index b27b49f463a5..96c0d6dc5f23 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -199,7 +199,9 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _containerRegistryTaskRunTaskRunsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(_containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var uri = _containerRegistryTaskRunTaskRunsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(response, rehydrationToken); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -224,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -241,7 +243,9 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _containerRegistryTaskRunTaskRunsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerRegistryArmOperation(_containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var uri = _containerRegistryTaskRunTaskRunsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ContainerRegistryArmOperation(response, rehydrationToken); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -266,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -287,7 +291,7 @@ public virtual async Task> Update try { var response = await _containerRegistryTaskRunTaskRunsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,7 +316,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -333,7 +337,7 @@ public virtual ArmOperation Update(WaitUntil w try { var response = _containerRegistryTaskRunTaskRunsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerRegistryArmOperation(new ContainerRegistryTaskRunOperationSource(Client), _containerRegistryTaskRunTaskRunsClientDiagnostics, Pipeline, _containerRegistryTaskRunTaskRunsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -358,7 +362,7 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -396,7 +400,7 @@ public virtual async Task> GetDetails /// /// /// Default Api Version - /// 2019-06-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs index 1d4488d63c10..922f6c707ca7 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tokenName, Ca /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string tokenName, Cancella /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string tokenName, CancellationToken cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs index b74b1f10b7b1..5b79e26fefd8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs index 3e3d00a77815..98639ebb7600 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string webhookName /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string webhookName, Cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string webhookName, CancellationToken cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs index 65063da4a9e8..692121b6f860 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -348,19 +348,19 @@ public virtual ArmOperation Update(WaitUntil w } /// - /// Triggers a ping event to be sent to the webhook. + /// Gets the configuration of service URI and custom headers for the webhook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig /// /// /// Operation Id - /// Webhooks_Ping + /// Webhooks_GetCallbackConfig /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -369,13 +369,13 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// The cancellation token to use. - public virtual async Task> PingAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetCallbackConfigAsync(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.Ping"); + using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.GetCallbackConfig"); scope.Start(); try { - var response = await _containerRegistryWebhookWebhooksRestClient.PingAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _containerRegistryWebhookWebhooksRestClient.GetCallbackConfigAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -386,19 +386,19 @@ public virtual async Task> PingAsync } /// - /// Triggers a ping event to be sent to the webhook. + /// Gets the configuration of service URI and custom headers for the webhook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig /// /// /// Operation Id - /// Webhooks_Ping + /// Webhooks_GetCallbackConfig /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -407,13 +407,13 @@ public virtual async Task> PingAsync /// /// /// The cancellation token to use. - public virtual Response Ping(CancellationToken cancellationToken = default) + public virtual Response GetCallbackConfig(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.Ping"); + using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.GetCallbackConfig"); scope.Start(); try { - var response = _containerRegistryWebhookWebhooksRestClient.Ping(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _containerRegistryWebhookWebhooksRestClient.GetCallbackConfig(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -436,7 +436,7 @@ public virtual Response Ping(CancellationToke /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -466,7 +466,7 @@ public virtual AsyncPageable GetEventsAsync(Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -484,19 +484,19 @@ public virtual Pageable GetEvents(CancellationTok } /// - /// Gets the configuration of service URI and custom headers for the webhook. + /// Triggers a ping event to be sent to the webhook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping /// /// /// Operation Id - /// Webhooks_GetCallbackConfig + /// Webhooks_Ping /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -505,13 +505,13 @@ public virtual Pageable GetEvents(CancellationTok /// /// /// The cancellation token to use. - public virtual async Task> GetCallbackConfigAsync(CancellationToken cancellationToken = default) + public virtual async Task> PingAsync(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.GetCallbackConfig"); + using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.Ping"); scope.Start(); try { - var response = await _containerRegistryWebhookWebhooksRestClient.GetCallbackConfigAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _containerRegistryWebhookWebhooksRestClient.PingAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -522,19 +522,19 @@ public virtual async Task> GetC } /// - /// Gets the configuration of service URI and custom headers for the webhook. + /// Triggers a ping event to be sent to the webhook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping /// /// /// Operation Id - /// Webhooks_GetCallbackConfig + /// Webhooks_Ping /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -543,13 +543,13 @@ public virtual async Task> GetC /// /// /// The cancellation token to use. - public virtual Response GetCallbackConfig(CancellationToken cancellationToken = default) + public virtual Response Ping(CancellationToken cancellationToken = default) { - using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.GetCallbackConfig"); + using var scope = _containerRegistryWebhookWebhooksClientDiagnostics.CreateScope("ContainerRegistryWebhookResource.Ping"); scope.Start(); try { - var response = _containerRegistryWebhookWebhooksRestClient.GetCallbackConfig(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _containerRegistryWebhookWebhooksRestClient.Ping(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -572,7 +572,7 @@ public virtual Response GetCallbackConfi /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -634,7 +634,7 @@ public virtual async Task> AddTagAsyn /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -696,7 +696,7 @@ public virtual Response AddTag(string key, str /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -753,7 +753,7 @@ public virtual async Task> SetTagsAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -810,7 +810,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -870,7 +870,7 @@ public virtual async Task> RemoveTagA /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs index 719ccf0d88b1..a206cbd6d47b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/ContainerRegistryExtensions.cs @@ -34,98 +34,98 @@ private static MockableContainerRegistrySubscriptionResource GetMockableContaine } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ContainerRegistryCacheRuleResource GetContainerRegistryCacheRuleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerRegistryResource GetContainerRegistryResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryCacheRuleResource(id); + return GetMockableContainerRegistryArmClient(client).GetContainerRegistryResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ConnectedRegistryResource GetConnectedRegistryResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerRegistryArmClient(client).GetConnectedRegistryResource(id); + return GetMockableContainerRegistryArmClient(client).GetContainerRegistryPrivateLinkResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ContainerRegistryCredentialSetResource GetContainerRegistryCredentialSetResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerRegistryCacheRuleResource GetContainerRegistryCacheRuleResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryCredentialSetResource(id); + return GetMockableContainerRegistryArmClient(client).GetContainerRegistryCacheRuleResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ContainerRegistryResource GetContainerRegistryResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ConnectedRegistryResource GetConnectedRegistryResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryResource(id); + return GetMockableContainerRegistryArmClient(client).GetConnectedRegistryResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerRegistryCredentialSetResource GetContainerRegistryCredentialSetResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerRegistryArmClient(client).GetContainerRegistryPrivateLinkResource(id); + return GetMockableContainerRegistryArmClient(client).GetContainerRegistryCredentialSetResource(id); } /// @@ -329,7 +329,7 @@ public static ContainerRegistryCollection GetContainerRegistries(this ResourceGr /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -367,7 +367,7 @@ public static async Task> GetContainerRegist /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -405,7 +405,7 @@ public static Response GetContainerRegistry(this Reso /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -418,7 +418,7 @@ public static Response GetContainerRegistry(this Reso /// /// /// The instance the method will execute against. - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// or is null. public static async Task> CheckContainerRegistryNameAvailabilityAsync(this SubscriptionResource subscriptionResource, ContainerRegistryNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -441,7 +441,7 @@ public static async Task> CheckCo /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -454,7 +454,7 @@ public static async Task> CheckCo /// /// /// The instance the method will execute against. - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// or is null. public static Response CheckContainerRegistryNameAvailability(this SubscriptionResource subscriptionResource, ContainerRegistryNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -477,7 +477,7 @@ public static Response CheckContainerRegis /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -513,7 +513,7 @@ public static AsyncPageable GetContainerRegistriesAsy /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs index 37abbc0770c9..1466e65fe2d5 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryArmClient.cs @@ -34,6 +34,30 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ContainerRegistryResource GetContainerRegistryResource(ResourceIdentifier id) + { + ContainerRegistryResource.ValidateResourceId(id); + return new ContainerRegistryResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(ResourceIdentifier id) + { + ContainerRegistryPrivateLinkResource.ValidateResourceId(id); + return new ContainerRegistryPrivateLinkResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -70,30 +94,6 @@ public virtual ContainerRegistryCredentialSetResource GetContainerRegistryCreden return new ContainerRegistryCredentialSetResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual ContainerRegistryResource GetContainerRegistryResource(ResourceIdentifier id) - { - ContainerRegistryResource.ValidateResourceId(id); - return new ContainerRegistryResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual ContainerRegistryPrivateLinkResource GetContainerRegistryPrivateLinkResource(ResourceIdentifier id) - { - ContainerRegistryPrivateLinkResource.ValidateResourceId(id); - return new ContainerRegistryPrivateLinkResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs index a14a12a821af..a3b8a6b69d66 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistryResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual ContainerRegistryCollection GetContainerRegistries() /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetContainerRegis /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs index 6e23a83e85a0..e69b3acdb0c3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Extensions/MockableContainerRegistrySubscriptionResource.cs @@ -55,7 +55,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -63,7 +63,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// is null. public virtual async Task> CheckContainerRegistryNameAvailabilityAsync(ContainerRegistryNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -97,7 +97,7 @@ public virtual async Task> CheckC /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -105,7 +105,7 @@ public virtual async Task> CheckC /// /// /// - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// is null. public virtual Response CheckContainerRegistryNameAvailability(ContainerRegistryNameAvailabilityContent content, CancellationToken cancellationToken = default) @@ -139,7 +139,7 @@ public virtual Response CheckContainerRegi /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual AsyncPageable GetContainerRegistriesAs /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryRunOperationSource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryRunOperationSource.cs deleted file mode 100644 index 316599b8d4b9..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryRunOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal class ContainerRegistryRunOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ContainerRegistryRunOperationSource(ArmClient client) - { - _client = client; - } - - ContainerRegistryRunResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerContainerRegistryContext.Default); - return new ContainerRegistryRunResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerContainerRegistryContext.Default); - return await Task.FromResult(new ContainerRegistryRunResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryTaskOperationSource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryTaskOperationSource.cs deleted file mode 100644 index 4d4641891379..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/LongRunningOperation/ContainerRegistryTaskOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry -{ - internal class ContainerRegistryTaskOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ContainerRegistryTaskOperationSource(ArmClient client) - { - _client = client; - } - - ContainerRegistryTaskResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerContainerRegistryContext.Default); - return new ContainerRegistryTaskResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerContainerRegistryContext.Default); - return await Task.FromResult(new ContainerRegistryTaskResource(_client, data)).ConfigureAwait(false); - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs new file mode 100644 index 000000000000..4f6f0c364d12 --- /dev/null +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerRegistry.Models +{ + /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". + public readonly partial struct AutoGeneratedDomainNameLabelScope : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoGeneratedDomainNameLabelScope(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnsecureValue = "Unsecure"; + private const string TenantReuseValue = "TenantReuse"; + private const string SubscriptionReuseValue = "SubscriptionReuse"; + private const string ResourceGroupReuseValue = "ResourceGroupReuse"; + private const string NoReuseValue = "NoReuse"; + + /// Unsecure. + public static AutoGeneratedDomainNameLabelScope Unsecure { get; } = new AutoGeneratedDomainNameLabelScope(UnsecureValue); + /// TenantReuse. + public static AutoGeneratedDomainNameLabelScope TenantReuse { get; } = new AutoGeneratedDomainNameLabelScope(TenantReuseValue); + /// SubscriptionReuse. + public static AutoGeneratedDomainNameLabelScope SubscriptionReuse { get; } = new AutoGeneratedDomainNameLabelScope(SubscriptionReuseValue); + /// ResourceGroupReuse. + public static AutoGeneratedDomainNameLabelScope ResourceGroupReuse { get; } = new AutoGeneratedDomainNameLabelScope(ResourceGroupReuseValue); + /// NoReuse. + public static AutoGeneratedDomainNameLabelScope NoReuse { get; } = new AutoGeneratedDomainNameLabelScope(NoReuseValue); + /// Determines if two values are the same. + public static bool operator ==(AutoGeneratedDomainNameLabelScope left, AutoGeneratedDomainNameLabelScope right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoGeneratedDomainNameLabelScope left, AutoGeneratedDomainNameLabelScope right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutoGeneratedDomainNameLabelScope(string value) => new AutoGeneratedDomainNameLabelScope(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoGeneratedDomainNameLabelScope other && Equals(other); + /// + public bool Equals(AutoGeneratedDomainNameLabelScope other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureADAuthenticationAsArmPolicy.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureADAuthenticationAsArmPolicy.cs index 98a1ff236195..3e905847e51a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureADAuthenticationAsArmPolicy.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureADAuthenticationAsArmPolicy.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { - /// The policy for using ARM audience token for a container registry. + /// The policy for using Azure Resource Manager audience token for a container registry. internal partial class AzureADAuthenticationAsArmPolicy { /// diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureResourceManagerContainerRegistryContext.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureResourceManagerContainerRegistryContext.cs index 5cd1be10e66a..93ee2809a3a0 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureResourceManagerContainerRegistryContext.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/AzureResourceManagerContainerRegistryContext.cs @@ -25,7 +25,6 @@ namespace Azure.ResourceManager.ContainerRegistry [ModelReaderWriterBuildable(typeof(ConnectedRegistryLoginServer))] [ModelReaderWriterBuildable(typeof(ConnectedRegistryParent))] [ModelReaderWriterBuildable(typeof(ConnectedRegistryPatch))] - [ModelReaderWriterBuildable(typeof(ConnectedRegistryPropertiesActivation))] [ModelReaderWriterBuildable(typeof(ConnectedRegistryResource))] [ModelReaderWriterBuildable(typeof(ConnectedRegistryStatusDetail))] [ModelReaderWriterBuildable(typeof(ConnectedRegistrySyncProperties))] diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CacheRulesListResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CacheRulesListResult.cs index 36db9684ddda..aab551f5c0d2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CacheRulesListResult.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/CacheRulesListResult.cs @@ -52,8 +52,8 @@ internal CacheRulesListResult() } /// Initializes a new instance of . - /// The list of cache rules. - /// If provided, client must use NextLink URI to request next list of cache rules. + /// The list of cache rules. Since this list may be incomplete, the nextLink field should be used to request the next list of cache rules. + /// The URI that can be used to request the next list of cache rules. /// Keeps track of any properties unknown to the library. internal CacheRulesListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +62,9 @@ internal CacheRulesListResult(IReadOnlyList valu _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of cache rules. + /// The list of cache rules. Since this list may be incomplete, the nextLink field should be used to request the next list of cache rules. public IReadOnlyList Value { get; } - /// If provided, client must use NextLink URI to request next list of cache rules. + /// The URI that can be used to request the next list of cache rules. public string NextLink { get; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs index b4146f220dcb..10a0dcc15443 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryActivation.cs @@ -43,7 +43,7 @@ internal partial class ConnectedRegistryActivation /// /// /// - private protected IDictionary _serializedAdditionalRawData; + private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . internal ConnectedRegistryActivation() diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs index 30d117394bc5..d243f0fe0f42 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPatch.cs @@ -54,7 +54,7 @@ public ConnectedRegistryPatch() } /// Initializes a new instance of . - /// The parameters for updating the sync properties of the connected registry with its parent. + /// The sync properties of the connected registry with its parent. /// The logging properties of the connected registry. /// The list of the ACR token resource IDs used to authenticate clients to the connected registry. /// The list of notifications subscription information for the connected registry. @@ -70,7 +70,7 @@ internal ConnectedRegistryPatch(ConnectedRegistrySyncUpdateProperties syncProper _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The parameters for updating the sync properties of the connected registry with its parent. + /// The sync properties of the connected registry with its parent. [WirePath("properties.syncProperties")] public ConnectedRegistrySyncUpdateProperties SyncProperties { get; set; } /// The logging properties of the connected registry. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.Serialization.cs deleted file mode 100644 index 1d71de6a5be5..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - internal partial class ConnectedRegistryPropertiesActivation : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - ConnectedRegistryPropertiesActivation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConnectedRegistryPropertiesActivation(document.RootElement, options); - } - - internal static ConnectedRegistryPropertiesActivation DeserializeConnectedRegistryPropertiesActivation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConnectedRegistryActivationStatus? status = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new ConnectedRegistryActivationStatus(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConnectedRegistryPropertiesActivation(status, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" status: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Status)) - { - builder.Append(" status: "); - builder.AppendLine($"'{Status.Value.ToString()}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerContainerRegistryContext.Default); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support writing '{options.Format}' format."); - } - } - - ConnectedRegistryPropertiesActivation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeConnectedRegistryPropertiesActivation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConnectedRegistryPropertiesActivation)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.cs deleted file mode 100644 index 124a7f7eba9c..000000000000 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryPropertiesActivation.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ContainerRegistry.Models -{ - /// The ConnectedRegistryPropertiesActivation. - internal partial class ConnectedRegistryPropertiesActivation : ConnectedRegistryActivation - { - /// Initializes a new instance of . - internal ConnectedRegistryPropertiesActivation() - { - } - - /// Initializes a new instance of . - /// The activation status of the connected registry. - /// Keeps track of any properties unknown to the library. - internal ConnectedRegistryPropertiesActivation(ConnectedRegistryActivationStatus? status, IDictionary serializedAdditionalRawData) : base(status, serializedAdditionalRawData) - { - } - } -} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryStatusDetail.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryStatusDetail.cs index c067829c4355..4ada263eda53 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryStatusDetail.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ConnectedRegistryStatusDetail.cs @@ -52,7 +52,7 @@ internal ConnectedRegistryStatusDetail() /// Initializes a new instance of . /// The component of the connected registry corresponding to the status. - /// The code of the status. + /// The HTTP status code. /// The description of the status. /// The timestamp of the status. /// The correlation ID of the status. @@ -70,7 +70,7 @@ internal ConnectedRegistryStatusDetail(string statusDetailType, string code, str /// The component of the connected registry corresponding to the status. [WirePath("type")] public string StatusDetailType { get; } - /// The code of the status. + /// The HTTP status code. [WirePath("code")] public string Code { get; } /// The description of the status. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs index 71fb7d33c80e..653a34ddfb0f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.Serialization.cs @@ -138,14 +138,11 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SourceRegistryLoginMode", out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceRegistry), out propertyOverride); if (hasPropertyOverride) { builder.Append(" sourceRegistry: "); - builder.AppendLine("{"); - builder.Append(" loginMode: "); builder.AppendLine(propertyOverride); - builder.AppendLine(" }"); } else { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs index 9009c6d670ae..f46b7ea57557 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryCredentials.cs @@ -67,24 +67,8 @@ internal ContainerRegistryCredentials(SourceRegistryCredentials sourceRegistry, } /// Describes the credential parameters for accessing the source registry. - internal SourceRegistryCredentials SourceRegistry { get; set; } - /// - /// The authentication mode which determines the source registry login scope. The credentials for the source registry - /// will be generated using the given scope. These credentials will be used to login to - /// the source registry during the run. - /// - [WirePath("sourceRegistry.loginMode")] - public SourceRegistryLoginMode? SourceRegistryLoginMode - { - get => SourceRegistry is null ? default : SourceRegistry.LoginMode; - set - { - if (SourceRegistry is null) - SourceRegistry = new SourceRegistryCredentials(); - SourceRegistry.LoginMode = value; - } - } - + [WirePath("sourceRegistry")] + public SourceRegistryCredentials SourceRegistry { get; set; } /// /// 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 diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs index ff0d2219c4e1..907dc457b4ce 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.Serialization.cs @@ -38,6 +38,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Name); writer.WritePropertyName("type"u8); writer.WriteStringValue(ResourceType.ToString()); + if (Optional.IsDefined(ResourceGroupName)) + { + writer.WritePropertyName("resourceGroupName"u8); + writer.WriteStringValue(ResourceGroupName); + } + if (Optional.IsDefined(AutoGeneratedDomainNameLabelScope)) + { + writer.WritePropertyName("autoGeneratedDomainNameLabelScope"u8); + writer.WriteStringValue(AutoGeneratedDomainNameLabelScope.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,6 +87,8 @@ internal static ContainerRegistryNameAvailabilityContent DeserializeContainerReg } string name = default; ContainerRegistryResourceType type = default; + string resourceGroupName = default; + AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -91,13 +103,27 @@ internal static ContainerRegistryNameAvailabilityContent DeserializeContainerReg type = new ContainerRegistryResourceType(property.Value.GetString()); continue; } + if (property.NameEquals("resourceGroupName"u8)) + { + resourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoGeneratedDomainNameLabelScope"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoGeneratedDomainNameLabelScope = new AutoGeneratedDomainNameLabelScope(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryNameAvailabilityContent(name, type, serializedAdditionalRawData); + return new ContainerRegistryNameAvailabilityContent(name, type, resourceGroupName, autoGeneratedDomainNameLabelScope, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs index 467ee56cc19c..bde516a1947a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailabilityContent.cs @@ -59,11 +59,15 @@ public ContainerRegistryNameAvailabilityContent(string name) /// Initializes a new instance of . /// The name of the container registry. /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. + /// The resource group name of the container registry. + /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". /// Keeps track of any properties unknown to the library. - internal ContainerRegistryNameAvailabilityContent(string name, ContainerRegistryResourceType resourceType, IDictionary serializedAdditionalRawData) + internal ContainerRegistryNameAvailabilityContent(string name, ContainerRegistryResourceType resourceType, string resourceGroupName, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, IDictionary serializedAdditionalRawData) { Name = name; ResourceType = resourceType; + ResourceGroupName = resourceGroupName; + AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -78,5 +82,11 @@ internal ContainerRegistryNameAvailabilityContent() /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. [WirePath("type")] public ContainerRegistryResourceType ResourceType { get; } + /// The resource group name of the container registry. + [WirePath("resourceGroupName")] + public string ResourceGroupName { get; set; } + /// The auto generated domain name label of the container registry. This value defaults to "Unsecure". + [WirePath("autoGeneratedDomainNameLabelScope")] + public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs index 2dfe064295cd..2068638d7060 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.Serialization.cs @@ -35,6 +35,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerRegistryNameAvailableResult)} does not support writing '{format}' format."); } + if (Optional.IsDefined(AvailableLoginServerName)) + { + writer.WritePropertyName("availableLoginServerName"u8); + writer.WriteStringValue(AvailableLoginServerName); + } if (Optional.IsDefined(IsNameAvailable)) { writer.WritePropertyName("nameAvailable"u8); @@ -87,6 +92,7 @@ internal static ContainerRegistryNameAvailableResult DeserializeContainerRegistr { return null; } + string availableLoginServerName = default; bool? nameAvailable = default; string reason = default; string message = default; @@ -94,6 +100,11 @@ internal static ContainerRegistryNameAvailableResult DeserializeContainerRegistr Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("availableLoginServerName"u8)) + { + availableLoginServerName = property.Value.GetString(); + continue; + } if (property.NameEquals("nameAvailable"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -119,7 +130,7 @@ internal static ContainerRegistryNameAvailableResult DeserializeContainerRegistr } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerRegistryNameAvailableResult(nameAvailable, reason, message, serializedAdditionalRawData); + return new ContainerRegistryNameAvailableResult(availableLoginServerName, nameAvailable, reason, message, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -133,6 +144,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvailableLoginServerName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" availableLoginServerName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AvailableLoginServerName)) + { + builder.Append(" availableLoginServerName: "); + if (AvailableLoginServerName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AvailableLoginServerName}'''"); + } + else + { + builder.AppendLine($"'{AvailableLoginServerName}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsNameAvailable), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs index f283691e35d6..58cc7b79002e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryNameAvailableResult.cs @@ -51,18 +51,23 @@ internal ContainerRegistryNameAvailableResult() } /// Initializes a new instance of . + /// The complete login server name with domain name label (DNL) hash, if available. /// The value that indicates whether the name is available. /// If any, the reason that the name is not available. /// If any, the error message that provides more detail for the reason that the name is not available. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryNameAvailableResult(bool? isNameAvailable, string reason, string message, IDictionary serializedAdditionalRawData) + internal ContainerRegistryNameAvailableResult(string availableLoginServerName, bool? isNameAvailable, string reason, string message, IDictionary serializedAdditionalRawData) { + AvailableLoginServerName = availableLoginServerName; IsNameAvailable = isNameAvailable; Reason = reason; Message = message; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The complete login server name with domain name label (DNL) hash, if available. + [WirePath("availableLoginServerName")] + public string AvailableLoginServerName { get; } /// The value that indicates whether the name is available. [WirePath("nameAvailable")] public bool? IsNameAvailable { get; } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs index 64c4c5ddcaa1..86b31a397970 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.Serialization.cs @@ -94,11 +94,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("networkRuleBypassOptions"u8); writer.WriteStringValue(NetworkRuleBypassOptions.Value.ToString()); } + if (Optional.IsDefined(NetworkRuleBypassAllowedForTasks)) + { + writer.WritePropertyName("networkRuleBypassAllowedForTasks"u8); + writer.WriteBooleanValue(NetworkRuleBypassAllowedForTasks.Value); + } if (Optional.IsDefined(IsAnonymousPullEnabled)) { writer.WritePropertyName("anonymousPullEnabled"u8); writer.WriteBooleanValue(IsAnonymousPullEnabled.Value); } + if (Optional.IsDefined(RoleAssignmentMode)) + { + writer.WritePropertyName("roleAssignmentMode"u8); + writer.WriteStringValue(RoleAssignmentMode.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -147,7 +157,9 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle bool? dataEndpointEnabled = default; ContainerRegistryPublicNetworkAccess? publicNetworkAccess = default; ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions = default; + bool? networkRuleBypassAllowedForTasks = default; bool? anonymousPullEnabled = default; + ContainerRegistryRoleAssignmentMode? roleAssignmentMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -256,6 +268,15 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle networkRuleBypassOptions = new ContainerRegistryNetworkRuleBypassOption(property0.Value.GetString()); continue; } + if (property0.NameEquals("networkRuleBypassAllowedForTasks"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkRuleBypassAllowedForTasks = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("anonymousPullEnabled"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -265,6 +286,15 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle anonymousPullEnabled = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("roleAssignmentMode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + roleAssignmentMode = new ContainerRegistryRoleAssignmentMode(property0.Value.GetString()); + continue; + } } continue; } @@ -285,7 +315,9 @@ internal static ContainerRegistryPatch DeserializeContainerRegistryPatch(JsonEle dataEndpointEnabled, publicNetworkAccess, networkRuleBypassOptions, + networkRuleBypassAllowedForTasks, anonymousPullEnabled, + roleAssignmentMode, serializedAdditionalRawData); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs index fbef70e6a45a..b7db3591667d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPatch.cs @@ -63,9 +63,11 @@ public ContainerRegistryPatch() /// Enable a single data endpoint per region for serving data. /// Whether or not public network access is allowed for the container registry. /// Whether to allow trusted Azure services to access a network restricted registry. + /// Whether to allow ACR Tasks service to access a network restricted registry. /// Enables registry-wide pull from unauthenticated clients. + /// Determines registry role assignment mode. /// Keeps track of any properties unknown to the library. - internal ContainerRegistryPatch(ManagedServiceIdentity identity, IDictionary tags, ContainerRegistrySku sku, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, bool? isAnonymousPullEnabled, IDictionary serializedAdditionalRawData) + internal ContainerRegistryPatch(ManagedServiceIdentity identity, IDictionary tags, ContainerRegistrySku sku, bool? isAdminUserEnabled, ContainerRegistryNetworkRuleSet networkRuleSet, ContainerRegistryPolicies policies, ContainerRegistryEncryption encryption, bool? isDataEndpointEnabled, ContainerRegistryPublicNetworkAccess? publicNetworkAccess, ContainerRegistryNetworkRuleBypassOption? networkRuleBypassOptions, bool? networkRuleBypassAllowedForTasks, bool? isAnonymousPullEnabled, ContainerRegistryRoleAssignmentMode? roleAssignmentMode, IDictionary serializedAdditionalRawData) { Identity = identity; Tags = tags; @@ -77,7 +79,9 @@ internal ContainerRegistryPatch(ManagedServiceIdentity identity, IDictionary Whether to allow trusted Azure services to access a network restricted registry. [WirePath("properties.networkRuleBypassOptions")] public ContainerRegistryNetworkRuleBypassOption? NetworkRuleBypassOptions { get; set; } + /// Whether to allow ACR Tasks service to access a network restricted registry. + [WirePath("properties.networkRuleBypassAllowedForTasks")] + public bool? NetworkRuleBypassAllowedForTasks { get; set; } /// Enables registry-wide pull from unauthenticated clients. [WirePath("properties.anonymousPullEnabled")] public bool? IsAnonymousPullEnabled { get; set; } + /// Determines registry role assignment mode. + [WirePath("properties.roleAssignmentMode")] + public ContainerRegistryRoleAssignmentMode? RoleAssignmentMode { get; set; } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs index 206355707397..244767c07685 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryPolicies.cs @@ -55,7 +55,7 @@ public ContainerRegistryPolicies() /// The content trust policy for a container registry. /// The retention policy for a container registry. /// The export policy for a container registry. - /// The policy for using ARM audience token for a container registry. + /// The policy for using Azure Resource Manager audience token for a container registry. /// Keeps track of any properties unknown to the library. internal ContainerRegistryPolicies(ContainerRegistryQuarantinePolicy quarantinePolicy, ContainerRegistryTrustPolicy trustPolicy, ContainerRegistryRetentionPolicy retentionPolicy, ContainerRegistryExportPolicy exportPolicy, AzureADAuthenticationAsArmPolicy azureADAuthenticationAsArmPolicy, IDictionary serializedAdditionalRawData) { @@ -103,7 +103,7 @@ public ContainerRegistryExportPolicyStatus? ExportStatus } } - /// The policy for using ARM audience token for a container registry. + /// The policy for using Azure Resource Manager audience token for a container registry. internal AzureADAuthenticationAsArmPolicy AzureADAuthenticationAsArmPolicy { get; set; } /// The value that indicates whether the policy is enabled or not. [WirePath("azureADAuthenticationAsArmPolicy.status")] diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceType.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceType.cs index fd0c8fecc008..9616b4b7a4d3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceType.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryResourceType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { - /// The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'. + /// The resource type for Container Registry. public readonly partial struct ContainerRegistryResourceType : IEquatable { private readonly string _value; diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRoleAssignmentMode.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRoleAssignmentMode.cs new file mode 100644 index 000000000000..d827654379a1 --- /dev/null +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRoleAssignmentMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerRegistry.Models +{ + /// Determines registry role assignment mode. + public readonly partial struct ContainerRegistryRoleAssignmentMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerRegistryRoleAssignmentMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AbacRepositoryPermissionsValue = "AbacRepositoryPermissions"; + private const string LegacyRegistryPermissionsValue = "LegacyRegistryPermissions"; + + /// AbacRepositoryPermissions. + public static ContainerRegistryRoleAssignmentMode AbacRepositoryPermissions { get; } = new ContainerRegistryRoleAssignmentMode(AbacRepositoryPermissionsValue); + /// LegacyRegistryPermissions. + public static ContainerRegistryRoleAssignmentMode LegacyRegistryPermissions { get; } = new ContainerRegistryRoleAssignmentMode(LegacyRegistryPermissionsValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerRegistryRoleAssignmentMode left, ContainerRegistryRoleAssignmentMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerRegistryRoleAssignmentMode left, ContainerRegistryRoleAssignmentMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ContainerRegistryRoleAssignmentMode(string value) => new ContainerRegistryRoleAssignmentMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerRegistryRoleAssignmentMode other && Equals(other); + /// + public bool Equals(ContainerRegistryRoleAssignmentMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunListResult.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunListResult.cs index 1a88cf7594e0..4bbb9154a5d3 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunListResult.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/ContainerRegistryRunListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { - /// Collection of runs. + /// The collection of runs. internal partial class ContainerRegistryRunListResult { /// diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs index b4828f93052c..469357e093c2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.Serialization.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { - internal partial class SourceRegistryCredentials : IUtf8JsonSerializable, IJsonModel + public partial class SourceRegistryCredentials : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -35,6 +35,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SourceRegistryCredentials)} does not support writing '{format}' format."); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteStringValue(Identity); + } if (Optional.IsDefined(LoginMode)) { writer.WritePropertyName("loginMode"u8); @@ -77,11 +82,17 @@ internal static SourceRegistryCredentials DeserializeSourceRegistryCredentials(J { return null; } + string identity = default; SourceRegistryLoginMode? loginMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("identity"u8)) + { + identity = property.Value.GetString(); + continue; + } if (property.NameEquals("loginMode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -97,7 +108,7 @@ internal static SourceRegistryCredentials DeserializeSourceRegistryCredentials(J } } serializedAdditionalRawData = rawDataDictionary; - return new SourceRegistryCredentials(loginMode, serializedAdditionalRawData); + return new SourceRegistryCredentials(identity, loginMode, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -111,6 +122,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + if (Identity.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Identity}'''"); + } + else + { + builder.AppendLine($"'{Identity}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LoginMode), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.cs index d89f8a5c03fc..d6110bb4ac72 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/Models/SourceRegistryCredentials.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ContainerRegistry.Models { /// Describes the credential parameters for accessing the source registry. - internal partial class SourceRegistryCredentials + public partial class SourceRegistryCredentials { /// /// Keeps track of any properties unknown to the library. @@ -51,18 +51,31 @@ public SourceRegistryCredentials() } /// Initializes a new instance of . + /// + /// The Entra identity used for source registry login. + /// The value is `[system]` for system-assigned managed identity, `[caller]` for caller identity, + /// and client ID for user-assigned managed identity. + /// /// /// The authentication mode which determines the source registry login scope. The credentials for the source registry /// will be generated using the given scope. These credentials will be used to login to /// the source registry during the run. /// /// Keeps track of any properties unknown to the library. - internal SourceRegistryCredentials(SourceRegistryLoginMode? loginMode, IDictionary serializedAdditionalRawData) + internal SourceRegistryCredentials(string identity, SourceRegistryLoginMode? loginMode, IDictionary serializedAdditionalRawData) { + Identity = identity; LoginMode = loginMode; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// + /// The Entra identity used for source registry login. + /// The value is `[system]` for system-assigned managed identity, `[caller]` for caller identity, + /// and client ID for user-assigned managed identity. + /// + [WirePath("identity")] + public string Identity { get; set; } /// /// The authentication mode which determines the source registry login scope. The credentials for the source registry /// will be generated using the given scope. These credentials will be used to login to diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/AgentPoolsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/AgentPoolsRestOperations.cs index 8d02a25e302f..4fd432cf2e0d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/AgentPoolsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/AgentPoolsRestOperations.cs @@ -32,11 +32,11 @@ public AgentPoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,13 +46,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/agentPools/", false); - uri.AppendPath(agentPoolName, true); + uri.AppendPath("/agentPools", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -65,8 +64,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/agentPools/", false); - uri.AppendPath(agentPoolName, true); + uri.AppendPath("/agentPools", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -74,73 +72,65 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets the detailed information for a given agent pool. + /// Lists all the agent pools for a specified container registry. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The name of the agent pool. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, agentPoolName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryAgentPoolData value = default; + ContainerRegistryAgentPoolListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryAgentPoolData.DeserializeContainerRegistryAgentPoolData(document.RootElement); + value = ContainerRegistryAgentPoolListResult.DeserializeContainerRegistryAgentPoolListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ContainerRegistryAgentPoolData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets the detailed information for a given agent pool. + /// Lists all the agent pools for a specified container registry. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The name of the agent pool. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, agentPoolName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryAgentPoolData value = default; + ContainerRegistryAgentPoolListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryAgentPoolData.DeserializeContainerRegistryAgentPoolData(document.RootElement); + value = ContainerRegistryAgentPoolListResult.DeserializeContainerRegistryAgentPoolListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ContainerRegistryAgentPoolData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, ContainerRegistryAgentPoolData data) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -156,11 +146,11 @@ internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, ContainerRegistryAgentPoolData data) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -174,73 +164,77 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates an agent pool for a container registry with the specified parameters. + /// Gets the detailed information for a given agent pool. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the agent pool. - /// The parameters of an agent pool that needs to scheduled. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, ContainerRegistryAgentPoolData data, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, agentPoolName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, agentPoolName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + ContainerRegistryAgentPoolData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerRegistryAgentPoolData.DeserializeContainerRegistryAgentPoolData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerRegistryAgentPoolData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Creates an agent pool for a container registry with the specified parameters. + /// Gets the detailed information for a given agent pool. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the agent pool. - /// The parameters of an agent pool that needs to scheduled. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, ContainerRegistryAgentPoolData data, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, agentPoolName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, agentPoolName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + ContainerRegistryAgentPoolData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerRegistryAgentPoolData.DeserializeContainerRegistryAgentPoolData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerRegistryAgentPoolData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName) + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, ContainerRegistryAgentPoolData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -256,11 +250,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, ContainerRegistryAgentPoolData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -274,60 +268,66 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a specified agent pool resource. + /// Creates an agent pool for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the agent pool. + /// The parameters of an agent pool that needs to scheduled. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, ContainerRegistryAgentPoolData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, agentPoolName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, agentPoolName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a specified agent pool resource. + /// Creates an agent pool for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the agent pool. + /// The parameters of an agent pool that needs to scheduled. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, ContainerRegistryAgentPoolData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, agentPoolName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, agentPoolName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); @@ -378,8 +378,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Updates an agent pool with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the agent pool. /// The parameters for updating an agent pool. /// The cancellation token to use. @@ -407,8 +407,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Updates an agent pool with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the agent pool. /// The parameters for updating an agent pool. /// The cancellation token to use. @@ -434,7 +434,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -444,16 +444,17 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/agentPools", false); + uri.AppendPath("/agentPools/", false); + uri.AppendPath(agentPoolName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -462,7 +463,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/agentPools", false); + uri.AppendPath("/agentPools/", false); + uri.AppendPath(agentPoolName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -470,59 +472,55 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Lists all the agent pools for a specified container registry. + /// Deletes a specified agent pool resource. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. + /// The name of the agent pool. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, agentPoolName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ContainerRegistryAgentPoolListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryAgentPoolListResult.DeserializeContainerRegistryAgentPoolListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists all the agent pools for a specified container registry. + /// Deletes a specified agent pool resource. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. + /// The name of the agent pool. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, agentPoolName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ContainerRegistryAgentPoolListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryAgentPoolListResult.DeserializeContainerRegistryAgentPoolListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -570,8 +568,8 @@ internal HttpMessage CreateGetQueueStatusRequest(string subscriptionId, string r /// Gets the count of queued runs for a given agent pool. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the agent pool. /// The cancellation token to use. /// , , or is null. @@ -601,8 +599,8 @@ public async Task> GetQueueStatu /// Gets the count of queued runs for a given agent pool. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the agent pool. /// The cancellation token to use. /// , , or is null. @@ -655,8 +653,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all the agent pools for a specified container registry. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -686,8 +684,8 @@ public async Task> ListNextPageAs /// Lists all the agent pools for a specified container registry. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/BuildsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/BuildsRestOperations.cs index a1e41940ede1..c3d00f2cdebd 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/BuildsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/BuildsRestOperations.cs @@ -32,7 +32,7 @@ public BuildsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -74,7 +74,7 @@ internal HttpMessage CreateGetBuildSourceUploadUrlRequest(string subscriptionId, /// Get the upload location for the user to be able to upload the source. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. + /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The cancellation token to use. /// , or is null. @@ -103,7 +103,7 @@ public async Task> GetBuildSourceUploadUrlAsync /// Get the upload location for the user to be able to upload the source. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. + /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The cancellation token to use. /// , or is null. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs index 47da4d93b01b..28ddbcb041e8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CacheRulesRestOperations.cs @@ -32,7 +32,7 @@ public CacheRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,65 +368,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a cache rule resource from a container registry. + /// Updates a cache rule for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the cache rule. + /// The parameters for updating a cache rule. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(cacheRuleName, nameof(cacheRuleName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: + case 200: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a cache rule resource from a container registry. + /// Updates a cache rule for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the cache rule. + /// The parameters for updating a cache rule. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(cacheRuleName, nameof(cacheRuleName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: + case 200: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -442,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -460,66 +468,58 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a cache rule for a container registry with the specified parameters. + /// Deletes a cache rule resource from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the cache rule. - /// The parameters for updating a cache rule. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(cacheRuleName, nameof(cacheRuleName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a cache rule for a container registry with the specified parameters. + /// Deletes a cache rule resource from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the cache rule. - /// The parameters for updating a cache rule. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, ContainerRegistryCacheRulePatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string cacheRuleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(cacheRuleName, nameof(cacheRuleName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, cacheRuleName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs index 4a21a3113b4f..d785853ce16f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ConnectedRegistriesRestOperations.cs @@ -32,10 +32,114 @@ public ConnectedRegistriesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/connectedRegistries", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendPath("/connectedRegistries", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all connected registries for the specified container registry. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the container registry. + /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectedRegistryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all connected registries for the specified container registry. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the container registry. + /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectedRegistryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName) { var uri = new RawRequestUriBuilder(); @@ -434,110 +538,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName, string filter) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/connectedRegistries", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName, string filter) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/connectedRegistries", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all connected registries for the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ConnectedRegistryListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all connected registries for the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string registryName, string filter = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName, filter); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ConnectedRegistryListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ConnectedRegistryListResult.DeserializeConnectedRegistryListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateDeactivateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string connectedRegistryName) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs index 626f987933ac..f9791ce078f2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/CredentialSetsRestOperations.cs @@ -32,7 +32,7 @@ public CredentialSetsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,65 +368,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a credential set from a container registry. + /// Updates a credential set for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the credential set. + /// The parameters for updating a credential set. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(credentialSetName, nameof(credentialSetName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, credentialSetName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, credentialSetName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: + case 200: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a credential set from a container registry. + /// Updates a credential set for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the credential set. + /// The parameters for updating a credential set. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(credentialSetName, nameof(credentialSetName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, credentialSetName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, credentialSetName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: + case 200: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -442,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -460,66 +468,58 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a credential set for a container registry with the specified parameters. + /// Deletes a credential set from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the credential set. - /// The parameters for updating a credential set. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(credentialSetName, nameof(credentialSetName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, credentialSetName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, credentialSetName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a credential set for a container registry with the specified parameters. + /// Deletes a credential set from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the credential set. - /// The parameters for updating a credential set. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, ContainerRegistryCredentialSetPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string credentialSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(credentialSetName, nameof(credentialSetName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, credentialSetName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, credentialSetName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index a85b56949851..95ea285b737a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -367,6 +367,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(privateEndpointConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs index 85e10b61ac4e..4392d98de813 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RegistriesRestOperations.cs @@ -32,103 +32,10 @@ public RegistriesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateImportImageRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importImage", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateImportImageRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); - uri.AppendPath(registryName, true); - uri.AppendPath("/importImage", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Copies an image to this container registry from the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The parameters specifying the image to copy and the source container registry. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ImportImageAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateImportImageRequest(subscriptionId, resourceGroupName, registryName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Copies an image to this container registry from the specified container registry. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the container registry. - /// The parameters specifying the image to copy and the source container registry. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ImportImage(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateImportImageRequest(subscriptionId, resourceGroupName, registryName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateCheckNameAvailabilityRequestUri(string subscriptionId, ContainerRegistryNameAvailabilityContent content) { var uri = new RawRequestUriBuilder(); @@ -163,7 +70,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, C /// Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length. /// The ID of the target subscription. The value must be an UUID. - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -190,7 +97,7 @@ public async Task> CheckNameAvail /// Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length. /// The ID of the target subscription. The value must be an UUID. - /// The object containing information for the availability request. + /// The request body. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -567,6 +474,98 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); + uri.AppendPath(registryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a container registry with the specified parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the container registry. + /// The parameters for updating a container registry. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a container registry with the specified parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the container registry. + /// The parameters for updating a container registry. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName) { var uri = new RawRequestUriBuilder(); @@ -596,6 +595,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(registryName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } @@ -652,7 +652,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch) + internal RequestUriBuilder CreateGenerateCredentialsRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -662,15 +662,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); + uri.AppendPath("/generateCredentials", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch) + internal HttpMessage CreateGenerateCredentialsRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -679,72 +680,73 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); + uri.AppendPath("/generateCredentials", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Updates a container registry with the specified parameters. + /// Generate keys for a token of a specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The parameters for updating a container registry. + /// The parameters for generating credentials. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch, CancellationToken cancellationToken = default) + public async Task GenerateCredentialsAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, patch); + using var message = CreateGenerateCredentialsRequest(subscriptionId, resourceGroupName, registryName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a container registry with the specified parameters. + /// Generate keys for a token of a specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The parameters for updating a container registry. + /// The parameters for generating credentials. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryPatch patch, CancellationToken cancellationToken = default) + public Response GenerateCredentials(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, patch); + using var message = CreateGenerateCredentialsRequest(subscriptionId, resourceGroupName, registryName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListUsagesRequestUri(string subscriptionId, string resourceGroupName, string registryName) + internal RequestUriBuilder CreateImportImageRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -754,16 +756,16 @@ internal RequestUriBuilder CreateListUsagesRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/listUsages", false); + uri.AppendPath("/importImage", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListUsagesRequest(string subscriptionId, string resourceGroupName, string registryName) + internal HttpMessage CreateImportImageRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -772,73 +774,73 @@ internal HttpMessage CreateListUsagesRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/listUsages", false); + uri.AppendPath("/importImage", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Gets the quota usages for the specified container registry. + /// Copies an image to this container registry from the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. + /// The parameters specifying the image to copy and the source container registry. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListUsagesAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public async Task ImportImageAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListUsagesRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateImportImageRequest(subscriptionId, resourceGroupName, registryName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - ContainerRegistryUsageListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryUsageListResult.DeserializeContainerRegistryUsageListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets the quota usages for the specified container registry. + /// Copies an image to this container registry from the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. + /// The parameters specifying the image to copy and the source container registry. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListUsages(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public Response ImportImage(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryImportImageContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListUsagesRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateImportImageRequest(subscriptionId, resourceGroupName, registryName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - ContainerRegistryUsageListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryUsageListResult.DeserializeContainerRegistryUsageListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListPrivateLinkResourcesRequestUri(string subscriptionId, string resourceGroupName, string registryName) + internal RequestUriBuilder CreateListCredentialsRequestUri(string subscriptionId, string resourceGroupName, string registryName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -848,16 +850,16 @@ internal RequestUriBuilder CreateListPrivateLinkResourcesRequestUri(string subsc uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/privateLinkResources", false); + uri.AppendPath("/listCredentials", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId, string resourceGroupName, string registryName) + internal HttpMessage CreateListCredentialsRequest(string subscriptionId, string resourceGroupName, string registryName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -866,7 +868,7 @@ internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/privateLinkResources", false); + uri.AppendPath("/listCredentials", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -874,28 +876,28 @@ internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId return message; } - /// Lists the private link resources for a container registry. + /// Lists the login credentials for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListPrivateLinkResourcesAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public async Task> ListCredentialsAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - using var message = CreateListPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateListCredentialsRequest(subscriptionId, resourceGroupName, registryName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryPrivateLinkResourceListResult value = default; + ContainerRegistryListCredentialsResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryPrivateLinkResourceListResult.DeserializeContainerRegistryPrivateLinkResourceListResult(document.RootElement); + value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -903,28 +905,28 @@ public async Task> List } } - /// Lists the private link resources for a container registry. + /// Lists the login credentials for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListPrivateLinkResources(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public Response ListCredentials(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - using var message = CreateListPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateListCredentialsRequest(subscriptionId, resourceGroupName, registryName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryPrivateLinkResourceListResult value = default; + ContainerRegistryListCredentialsResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryPrivateLinkResourceListResult.DeserializeContainerRegistryPrivateLinkResourceListResult(document.RootElement); + value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -932,7 +934,7 @@ public Response ListPrivateLinkR } } - internal RequestUriBuilder CreateGetPrivateLinkResourceRequestUri(string subscriptionId, string resourceGroupName, string registryName, string groupName) + internal RequestUriBuilder CreateListUsagesRequestUri(string subscriptionId, string resourceGroupName, string registryName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -942,13 +944,12 @@ internal RequestUriBuilder CreateGetPrivateLinkResourceRequestUri(string subscri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/privateLinkResources/", false); - uri.AppendPath(groupName, true); + uri.AppendPath("/listUsages", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, string resourceGroupName, string registryName, string groupName) + internal HttpMessage CreateListUsagesRequest(string subscriptionId, string resourceGroupName, string registryName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -961,8 +962,7 @@ internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/privateLinkResources/", false); - uri.AppendPath(groupName, true); + uri.AppendPath("/listUsages", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -970,73 +970,65 @@ internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, return message; } - /// Gets a private link resource by a specified group name for a container registry. + /// Gets the quota usages for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The name of the private link resource. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetPrivateLinkResourceAsync(string subscriptionId, string resourceGroupName, string registryName, string groupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListUsagesAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - using var message = CreateGetPrivateLinkResourceRequest(subscriptionId, resourceGroupName, registryName, groupName); + using var message = CreateListUsagesRequest(subscriptionId, resourceGroupName, registryName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryPrivateLinkResourceData value = default; + ContainerRegistryUsageListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryPrivateLinkResourceData.DeserializeContainerRegistryPrivateLinkResourceData(document.RootElement); + value = ContainerRegistryUsageListResult.DeserializeContainerRegistryUsageListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ContainerRegistryPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets a private link resource by a specified group name for a container registry. + /// Gets the quota usages for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The name of the private link resource. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetPrivateLinkResource(string subscriptionId, string resourceGroupName, string registryName, string groupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListUsages(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - using var message = CreateGetPrivateLinkResourceRequest(subscriptionId, resourceGroupName, registryName, groupName); + using var message = CreateListUsagesRequest(subscriptionId, resourceGroupName, registryName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryPrivateLinkResourceData value = default; + ContainerRegistryUsageListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryPrivateLinkResourceData.DeserializeContainerRegistryPrivateLinkResourceData(document.RootElement); + value = ContainerRegistryUsageListResult.DeserializeContainerRegistryUsageListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ContainerRegistryPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListCredentialsRequestUri(string subscriptionId, string resourceGroupName, string registryName) + internal RequestUriBuilder CreateListPrivateLinkResourcesRequestUri(string subscriptionId, string resourceGroupName, string registryName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1046,16 +1038,16 @@ internal RequestUriBuilder CreateListCredentialsRequestUri(string subscriptionId uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/listCredentials", false); + uri.AppendPath("/privateLinkResources", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListCredentialsRequest(string subscriptionId, string resourceGroupName, string registryName) + internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId, string resourceGroupName, string registryName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1064,7 +1056,7 @@ internal HttpMessage CreateListCredentialsRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/listCredentials", false); + uri.AppendPath("/privateLinkResources", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1072,28 +1064,28 @@ internal HttpMessage CreateListCredentialsRequest(string subscriptionId, string return message; } - /// Lists the login credentials for the specified container registry. + /// Lists the private link resources for a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListCredentialsAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public async Task> ListPrivateLinkResourcesAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - using var message = CreateListCredentialsRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateListPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, registryName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryListCredentialsResult value = default; + ContainerRegistryPrivateLinkResourceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + value = ContainerRegistryPrivateLinkResourceListResult.DeserializeContainerRegistryPrivateLinkResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1101,28 +1093,28 @@ public async Task> ListCredenti } } - /// Lists the login credentials for the specified container registry. + /// Lists the private link resources for a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListCredentials(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + public Response ListPrivateLinkResources(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - using var message = CreateListCredentialsRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateListPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, registryName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryListCredentialsResult value = default; + ContainerRegistryPrivateLinkResourceListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + value = ContainerRegistryPrivateLinkResourceListResult.DeserializeContainerRegistryPrivateLinkResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1130,7 +1122,7 @@ public Response ListCredentials(string s } } - internal RequestUriBuilder CreateRegenerateCredentialRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content) + internal RequestUriBuilder CreateGetPrivateLinkResourceRequestUri(string subscriptionId, string resourceGroupName, string registryName, string groupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1140,16 +1132,17 @@ internal RequestUriBuilder CreateRegenerateCredentialRequestUri(string subscript uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/regenerateCredential", false); + uri.AppendPath("/privateLinkResources/", false); + uri.AppendPath(groupName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRegenerateCredentialRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content) + internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, string resourceGroupName, string registryName, string groupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1158,81 +1151,82 @@ internal HttpMessage CreateRegenerateCredentialRequest(string subscriptionId, st uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/regenerateCredential", false); + uri.AppendPath("/privateLinkResources/", false); + uri.AppendPath(groupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Regenerates one of the login credentials for the specified container registry. + /// Gets a private link resource by a specified group name for a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// Specifies name of the password which should be regenerated -- password or password2. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> RegenerateCredentialAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetPrivateLinkResourceAsync(string subscriptionId, string resourceGroupName, string registryName, string groupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - using var message = CreateRegenerateCredentialRequest(subscriptionId, resourceGroupName, registryName, content); + using var message = CreateGetPrivateLinkResourceRequest(subscriptionId, resourceGroupName, registryName, groupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryListCredentialsResult value = default; + ContainerRegistryPrivateLinkResourceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + value = ContainerRegistryPrivateLinkResourceData.DeserializeContainerRegistryPrivateLinkResourceData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ContainerRegistryPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Regenerates one of the login credentials for the specified container registry. + /// Gets a private link resource by a specified group name for a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// Specifies name of the password which should be regenerated -- password or password2. + /// The name of the private link associated with the Azure resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response RegenerateCredential(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetPrivateLinkResource(string subscriptionId, string resourceGroupName, string registryName, string groupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - using var message = CreateRegenerateCredentialRequest(subscriptionId, resourceGroupName, registryName, content); + using var message = CreateGetPrivateLinkResourceRequest(subscriptionId, resourceGroupName, registryName, groupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryListCredentialsResult value = default; + ContainerRegistryPrivateLinkResourceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + value = ContainerRegistryPrivateLinkResourceData.DeserializeContainerRegistryPrivateLinkResourceData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ContainerRegistryPrivateLinkResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGenerateCredentialsRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content) + internal RequestUriBuilder CreateRegenerateCredentialRequestUri(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1242,12 +1236,12 @@ internal RequestUriBuilder CreateGenerateCredentialsRequestUri(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/generateCredentials", false); + uri.AppendPath("/regenerateCredential", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGenerateCredentialsRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content) + internal HttpMessage CreateRegenerateCredentialRequest(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1260,7 +1254,7 @@ internal HttpMessage CreateGenerateCredentialsRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/generateCredentials", false); + uri.AppendPath("/regenerateCredential", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1272,55 +1266,63 @@ internal HttpMessage CreateGenerateCredentialsRequest(string subscriptionId, str return message; } - /// Generate keys for a token of a specified container registry. + /// Regenerates one of the login credentials for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The parameters for generating credentials. + /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task GenerateCredentialsAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) + public async Task> RegenerateCredentialAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGenerateCredentialsRequest(subscriptionId, resourceGroupName, registryName, content); + using var message = CreateRegenerateCredentialRequest(subscriptionId, resourceGroupName, registryName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ContainerRegistryListCredentialsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Generate keys for a token of a specified container registry. + /// Regenerates one of the login credentials for the specified container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The parameters for generating credentials. + /// Specifies name of the password which should be regenerated -- password or password2. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response GenerateCredentials(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryGenerateCredentialsContent content, CancellationToken cancellationToken = default) + public Response RegenerateCredential(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryCredentialRegenerateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGenerateCredentialsRequest(subscriptionId, resourceGroupName, registryName, content); + using var message = CreateRegenerateCredentialRequest(subscriptionId, resourceGroupName, registryName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ContainerRegistryListCredentialsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerRegistryListCredentialsResult.DeserializeContainerRegistryListCredentialsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs index 1acc4a7e9e26..ad6bfd710133 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ReplicationsRestOperations.cs @@ -32,7 +32,7 @@ public ReplicationsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string replicationName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string replicationName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -367,67 +367,74 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(replicationName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a replication from a container registry. + /// Updates a replication for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the replication. + /// The parameters for updating a replication. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string replicationName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(replicationName, nameof(replicationName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, replicationName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, replicationName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a replication from a container registry. + /// Updates a replication for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the replication. + /// The parameters for updating a replication. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string replicationName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(replicationName, nameof(replicationName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, replicationName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, replicationName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string replicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -443,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string replicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -461,66 +468,60 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a replication for a container registry with the specified parameters. + /// Deletes a replication from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the replication. - /// The parameters for updating a replication. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string replicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(replicationName, nameof(replicationName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, replicationName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, replicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a replication for a container registry with the specified parameters. + /// Deletes a replication from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the replication. - /// The parameters for updating a replication. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string replicationName, ContainerRegistryReplicationPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string replicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(replicationName, nameof(replicationName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, replicationName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, replicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RunsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RunsRestOperations.cs index c7fb77cc5d65..b82f5d385375 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RunsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/RunsRestOperations.cs @@ -32,7 +32,7 @@ public RunsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -90,8 +90,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets all the runs for a registry. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed. /// $top is supported for get list of runs, which limits the maximum number of runs to return. /// The cancellation token to use. @@ -121,8 +121,8 @@ public async Task> ListAsync(string sub /// Gets all the runs for a registry. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed. /// $top is supported for get list of runs, which limits the maximum number of runs to return. /// The cancellation token to use. @@ -190,8 +190,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the detailed information for a given run. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The run ID. /// The cancellation token to use. /// , , or is null. @@ -223,8 +223,8 @@ public async Task> GetAsync(string subscripti /// Gets the detailed information for a given run. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The run ID. /// The cancellation token to use. /// , , or is null. @@ -298,14 +298,14 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Patch the run properties. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The run ID. /// The run update properties. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string runId, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string runId, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -318,8 +318,12 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + ContainerRegistryRunData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerRegistryRunData.DeserializeContainerRegistryRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -327,14 +331,14 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Patch the run properties. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The run ID. /// The run update properties. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string runId, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string runId, ContainerRegistryRunPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -347,14 +351,18 @@ public Response Update(string subscriptionId, string resourceGroupName, string r switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + ContainerRegistryRunData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerRegistryRunData.DeserializeContainerRegistryRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetLogSasUrlRequestUri(string subscriptionId, string resourceGroupName, string registryName, string runId) + internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string resourceGroupName, string registryName, string runId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -366,12 +374,12 @@ internal RequestUriBuilder CreateGetLogSasUrlRequestUri(string subscriptionId, s uri.AppendPath(registryName, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); - uri.AppendPath("/listLogSasUrl", false); + uri.AppendPath("/cancel", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetLogSasUrlRequest(string subscriptionId, string resourceGroupName, string registryName, string runId) + internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string registryName, string runId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -386,7 +394,7 @@ internal HttpMessage CreateGetLogSasUrlRequest(string subscriptionId, string res uri.AppendPath(registryName, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); - uri.AppendPath("/listLogSasUrl", false); + uri.AppendPath("/cancel", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -394,69 +402,59 @@ internal HttpMessage CreateGetLogSasUrlRequest(string subscriptionId, string res return message; } - /// Gets a link to download the run logs. + /// Cancel an existing run. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The run ID. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetLogSasUrlAsync(string subscriptionId, string resourceGroupName, string registryName, string runId, CancellationToken cancellationToken = default) + public async Task CancelAsync(string subscriptionId, string resourceGroupName, string registryName, string runId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - using var message = CreateGetLogSasUrlRequest(subscriptionId, resourceGroupName, registryName, runId); + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, registryName, runId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - ContainerRegistryRunGetLogResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryRunGetLogResult.DeserializeContainerRegistryRunGetLogResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets a link to download the run logs. + /// Cancel an existing run. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The run ID. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetLogSasUrl(string subscriptionId, string resourceGroupName, string registryName, string runId, CancellationToken cancellationToken = default) + public Response Cancel(string subscriptionId, string resourceGroupName, string registryName, string runId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - using var message = CreateGetLogSasUrlRequest(subscriptionId, resourceGroupName, registryName, runId); + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, registryName, runId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - ContainerRegistryRunGetLogResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryRunGetLogResult.DeserializeContainerRegistryRunGetLogResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string resourceGroupName, string registryName, string runId) + internal RequestUriBuilder CreateGetLogSasUrlRequestUri(string subscriptionId, string resourceGroupName, string registryName, string runId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -468,12 +466,12 @@ internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string uri.AppendPath(registryName, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); - uri.AppendPath("/cancel", false); + uri.AppendPath("/listLogSasUrl", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string registryName, string runId) + internal HttpMessage CreateGetLogSasUrlRequest(string subscriptionId, string resourceGroupName, string registryName, string runId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -488,7 +486,7 @@ internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceG uri.AppendPath(registryName, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); - uri.AppendPath("/cancel", false); + uri.AppendPath("/listLogSasUrl", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -496,55 +494,63 @@ internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceG return message; } - /// Cancel an existing run. + /// Gets a link to download the run logs. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The run ID. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CancelAsync(string subscriptionId, string resourceGroupName, string registryName, string runId, CancellationToken cancellationToken = default) + public async Task> GetLogSasUrlAsync(string subscriptionId, string resourceGroupName, string registryName, string runId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, registryName, runId); + using var message = CreateGetLogSasUrlRequest(subscriptionId, resourceGroupName, registryName, runId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ContainerRegistryRunGetLogResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerRegistryRunGetLogResult.DeserializeContainerRegistryRunGetLogResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Cancel an existing run. + /// Gets a link to download the run logs. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The run ID. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Cancel(string subscriptionId, string resourceGroupName, string registryName, string runId, CancellationToken cancellationToken = default) + public Response GetLogSasUrl(string subscriptionId, string resourceGroupName, string registryName, string runId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, registryName, runId); + using var message = CreateGetLogSasUrlRequest(subscriptionId, resourceGroupName, registryName, runId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ContainerRegistryRunGetLogResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerRegistryRunGetLogResult.DeserializeContainerRegistryRunGetLogResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -575,8 +581,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets all the runs for a registry. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed. /// $top is supported for get list of runs, which limits the maximum number of runs to return. /// The cancellation token to use. @@ -608,8 +614,8 @@ public async Task> ListNextPageAsync(st /// Gets all the runs for a registry. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed. /// $top is supported for get list of runs, which limits the maximum number of runs to return. /// The cancellation token to use. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/SchedulesRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/SchedulesRestOperations.cs index de92e87061b2..46f29f0b8bde 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/SchedulesRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/SchedulesRestOperations.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -31,7 +32,7 @@ public SchedulesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,13 +78,13 @@ internal HttpMessage CreateScheduleRunRequest(string subscriptionId, string reso /// Schedules a new run based on the request parameters and add it to the run queue. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. + /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The parameters of a run that needs to scheduled. + /// The request body. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ScheduleRunAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) + public async Task> ScheduleRunAsync(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -95,8 +96,12 @@ public async Task ScheduleRunAsync(string subscriptionId, string resou switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ContainerRegistryRunData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerRegistryRunData.DeserializeContainerRegistryRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -104,13 +109,13 @@ public async Task ScheduleRunAsync(string subscriptionId, string resou /// Schedules a new run based on the request parameters and add it to the run queue. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. + /// The name of the resource group. The name is case insensitive. /// The name of the container registry. - /// The parameters of a run that needs to scheduled. + /// The request body. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ScheduleRun(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) + public Response ScheduleRun(string subscriptionId, string resourceGroupName, string registryName, ContainerRegistryRunContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -122,8 +127,12 @@ public Response ScheduleRun(string subscriptionId, string resourceGroupName, str switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ContainerRegistryRunData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerRegistryRunData.DeserializeContainerRegistryRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs index b69836ba9bfb..6d3821523553 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/ScopeMapsRestOperations.cs @@ -32,7 +32,7 @@ public ScopeMapsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,67 +368,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a scope map from a container registry. + /// Updates a scope map with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the scope map. + /// The parameters for updating a scope map. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(scopeMapName, nameof(scopeMapName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, scopeMapName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, scopeMapName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a scope map from a container registry. + /// Updates a scope map with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the scope map. + /// The parameters for updating a scope map. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(scopeMapName, nameof(scopeMapName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, scopeMapName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, scopeMapName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -444,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -462,66 +468,60 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a scope map with the specified parameters. + /// Deletes a scope map from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the scope map. - /// The parameters for updating a scope map. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(scopeMapName, nameof(scopeMapName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, scopeMapName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, scopeMapName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a scope map with the specified parameters. + /// Deletes a scope map from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the scope map. - /// The parameters for updating a scope map. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, ScopeMapPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string scopeMapName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(scopeMapName, nameof(scopeMapName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, scopeMapName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, scopeMapName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TaskRunsRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TaskRunsRestOperations.cs index 306f1ba4f97e..7a4906d28569 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TaskRunsRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TaskRunsRestOperations.cs @@ -32,11 +32,11 @@ public TaskRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,13 +46,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/taskRuns/", false); - uri.AppendPath(taskRunName, true); + uri.AppendPath("/taskRuns", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -65,8 +64,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/taskRuns/", false); - uri.AppendPath(taskRunName, true); + uri.AppendPath("/taskRuns", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -74,73 +72,65 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets the detailed information for a given task run. + /// Lists all the task runs for a specified container registry. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The name of the task run. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(taskRunName, nameof(taskRunName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, taskRunName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryTaskRunData value = default; + ContainerRegistryTaskRunListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryTaskRunData.DeserializeContainerRegistryTaskRunData(document.RootElement); + value = ContainerRegistryTaskRunListResult.DeserializeContainerRegistryTaskRunListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ContainerRegistryTaskRunData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets the detailed information for a given task run. + /// Lists all the task runs for a specified container registry. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. - /// The name of the task run. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); - Argument.AssertNotNullOrEmpty(taskRunName, nameof(taskRunName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, taskRunName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryTaskRunData value = default; + ContainerRegistryTaskRunListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryTaskRunData.DeserializeContainerRegistryTaskRunData(document.RootElement); + value = ContainerRegistryTaskRunListResult.DeserializeContainerRegistryTaskRunListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ContainerRegistryTaskRunData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, ContainerRegistryTaskRunData data) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -156,11 +146,11 @@ internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, ContainerRegistryTaskRunData data) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -174,73 +164,77 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates a task run for a container registry with the specified parameters. + /// Gets the detailed information for a given task run. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the task run. - /// The parameters of a run that needs to scheduled. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, ContainerRegistryTaskRunData data, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(taskRunName, nameof(taskRunName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, taskRunName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, taskRunName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + ContainerRegistryTaskRunData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerRegistryTaskRunData.DeserializeContainerRegistryTaskRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerRegistryTaskRunData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Creates a task run for a container registry with the specified parameters. + /// Gets the detailed information for a given task run. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the task run. - /// The parameters of a run that needs to scheduled. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, ContainerRegistryTaskRunData data, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(taskRunName, nameof(taskRunName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, taskRunName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, registryName, taskRunName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + ContainerRegistryTaskRunData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerRegistryTaskRunData.DeserializeContainerRegistryTaskRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ContainerRegistryTaskRunData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, ContainerRegistryTaskRunData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -256,11 +250,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, ContainerRegistryTaskRunData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -274,60 +268,66 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a specified task run resource. + /// Creates a task run for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the task run. + /// The parameters of a run that needs to scheduled. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, ContainerRegistryTaskRunData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(taskRunName, nameof(taskRunName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, taskRunName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, taskRunName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a specified task run resource. + /// Creates a task run for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the task run. + /// The parameters of a run that needs to scheduled. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, ContainerRegistryTaskRunData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(taskRunName, nameof(taskRunName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, taskRunName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, registryName, taskRunName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); @@ -378,8 +378,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Updates a task run with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the task run. /// The parameters for updating a task run. /// The cancellation token to use. @@ -407,8 +407,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Updates a task run with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the task run. /// The parameters for updating a task run. /// The cancellation token to use. @@ -434,7 +434,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateGetDetailsRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -446,16 +446,15 @@ internal RequestUriBuilder CreateGetDetailsRequestUri(string subscriptionId, str uri.AppendPath(registryName, true); uri.AppendPath("/taskRuns/", false); uri.AppendPath(taskRunName, true); - uri.AppendPath("/listDetails", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetDetailsRequest(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -466,7 +465,6 @@ internal HttpMessage CreateGetDetailsRequest(string subscriptionId, string resou uri.AppendPath(registryName, true); uri.AppendPath("/taskRuns/", false); uri.AppendPath(taskRunName, true); - uri.AppendPath("/listDetails", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -474,69 +472,61 @@ internal HttpMessage CreateGetDetailsRequest(string subscriptionId, string resou return message; } - /// Gets the detailed information for a given task run that includes all secrets. + /// Deletes a specified task run resource. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the task run. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetDetailsAsync(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(taskRunName, nameof(taskRunName)); - using var message = CreateGetDetailsRequest(subscriptionId, resourceGroupName, registryName, taskRunName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, taskRunName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - ContainerRegistryTaskRunData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryTaskRunData.DeserializeContainerRegistryTaskRunData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets the detailed information for a given task run that includes all secrets. + /// Deletes a specified task run resource. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the task run. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetDetails(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(taskRunName, nameof(taskRunName)); - using var message = CreateGetDetailsRequest(subscriptionId, resourceGroupName, registryName, taskRunName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, taskRunName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - ContainerRegistryTaskRunData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryTaskRunData.DeserializeContainerRegistryTaskRunData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string registryName) + internal RequestUriBuilder CreateGetDetailsRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -546,16 +536,18 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/taskRuns", false); + uri.AppendPath("/taskRuns/", false); + uri.AppendPath(taskRunName, true); + uri.AppendPath("/listDetails", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string registryName) + internal HttpMessage CreateGetDetailsRequest(string subscriptionId, string resourceGroupName, string registryName, string taskRunName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -564,7 +556,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerRegistry/registries/", false); uri.AppendPath(registryName, true); - uri.AppendPath("/taskRuns", false); + uri.AppendPath("/taskRuns/", false); + uri.AppendPath(taskRunName, true); + uri.AppendPath("/listDetails", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -572,28 +566,30 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Lists all the task runs for a specified container registry. + /// Gets the detailed information for a given task run that includes all secrets. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. + /// The name of the task run. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetDetailsAsync(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(taskRunName, nameof(taskRunName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateGetDetailsRequest(subscriptionId, resourceGroupName, registryName, taskRunName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryTaskRunListResult value = default; + ContainerRegistryTaskRunData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryTaskRunListResult.DeserializeContainerRegistryTaskRunListResult(document.RootElement); + value = ContainerRegistryTaskRunData.DeserializeContainerRegistryTaskRunData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -601,28 +597,30 @@ public async Task> ListAsync(string } } - /// Lists all the task runs for a specified container registry. + /// Gets the detailed information for a given task run that includes all secrets. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. + /// The name of the task run. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string registryName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetDetails(string subscriptionId, string resourceGroupName, string registryName, string taskRunName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); + Argument.AssertNotNullOrEmpty(taskRunName, nameof(taskRunName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, registryName); + using var message = CreateGetDetailsRequest(subscriptionId, resourceGroupName, registryName, taskRunName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryTaskRunListResult value = default; + ContainerRegistryTaskRunData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryTaskRunListResult.DeserializeContainerRegistryTaskRunListResult(document.RootElement); + value = ContainerRegistryTaskRunData.DeserializeContainerRegistryTaskRunData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -655,8 +653,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all the task runs for a specified container registry. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -686,8 +684,8 @@ public async Task> ListNextPageAsyn /// Lists all the task runs for a specified container registry. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TasksRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TasksRestOperations.cs index 935b0558abb8..da974aa4464d 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TasksRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TasksRestOperations.cs @@ -32,7 +32,7 @@ public TasksRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -74,8 +74,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Lists all the tasks for a specified container registry. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -103,8 +103,8 @@ public async Task> ListAsync(string su /// Lists all the tasks for a specified container registry. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -170,8 +170,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Get the properties of a specified task. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the container registry task. /// The cancellation token to use. /// , , or is null. @@ -203,8 +203,8 @@ public async Task> GetAsync(string subscript /// Get the properties of a specified task. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the container registry task. /// The cancellation token to use. /// , , or is null. @@ -278,14 +278,14 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates a task for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the container registry task. /// The parameters for creating a task. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskData data, CancellationToken cancellationToken = default) + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -299,7 +299,12 @@ public async Task CreateAsync(string subscriptionId, string resourceGr { case 200: case 201: - return message.Response; + { + ContainerRegistryTaskData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerRegistryTaskData.DeserializeContainerRegistryTaskData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -307,14 +312,14 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates a task for a container registry with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the container registry task. /// The parameters for creating a task. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -328,13 +333,18 @@ public Response Create(string subscriptionId, string resourceGroupName, string r { case 200: case 201: - return message.Response; + { + ContainerRegistryTaskData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerRegistryTaskData.DeserializeContainerRegistryTaskData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +360,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string taskName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,67 +378,81 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a specified task. + /// Updates a task with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the container registry task. + /// The parameters for updating a task. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string taskName, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, taskName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, taskName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + ContainerRegistryTaskData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ContainerRegistryTaskData.DeserializeContainerRegistryTaskData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Deletes a specified task. + /// Updates a task with the specified parameters. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the container registry task. + /// The parameters for updating a task. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string taskName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, taskName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, taskName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + ContainerRegistryTaskData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ContainerRegistryTaskData.DeserializeContainerRegistryTaskData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string taskName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -444,11 +468,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string taskName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -462,66 +486,58 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a task with the specified parameters. + /// Deletes a specified task. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the container registry task. - /// The parameters for updating a task. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string taskName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, taskName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, taskName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a task with the specified parameters. + /// Deletes a specified task. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the container registry task. - /// The parameters for updating a task. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string taskName, ContainerRegistryTaskPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string taskName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(taskName, nameof(taskName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, taskName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, taskName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -570,8 +586,8 @@ internal HttpMessage CreateGetDetailsRequest(string subscriptionId, string resou /// Returns a task with extended information that includes all secrets. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the container registry task. /// The cancellation token to use. /// , , or is null. @@ -601,8 +617,8 @@ public async Task> GetDetailsAsync(string su /// Returns a task with extended information that includes all secrets. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The name of the container registry task. /// The cancellation token to use. /// , , or is null. @@ -655,8 +671,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all the tasks for a specified container registry. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -686,8 +702,8 @@ public async Task> ListNextPageAsync(s /// Lists all the tasks for a specified container registry. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group to which the container registry belongs. - /// The name of the container registry. + /// The name of the resource group. The name is case insensitive. + /// The name of the Registry. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs index 10ba1af82be2..df7028bcbef6 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/TokensRestOperations.cs @@ -32,7 +32,7 @@ public TokensRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string tokenName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string tokenName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,67 +368,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a token from a container registry. + /// Updates a token with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the token. + /// The parameters for updating a token. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string tokenName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(tokenName, nameof(tokenName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, tokenName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, tokenName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a token from a container registry. + /// Updates a token with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the token. + /// The parameters for updating a token. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string tokenName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(tokenName, nameof(tokenName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, tokenName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, tokenName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string tokenName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -444,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string tokenName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -462,66 +468,60 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a token with the specified parameters. + /// Deletes a token from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the token. - /// The parameters for updating a token. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string tokenName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(tokenName, nameof(tokenName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, tokenName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, tokenName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a token with the specified parameters. + /// Deletes a token from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the token. - /// The parameters for updating a token. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string tokenName, ContainerRegistryTokenPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string tokenName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(tokenName, nameof(tokenName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, tokenName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, tokenName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs index 0b36a06d516f..9cb49f39be72 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/RestOperations/WebhooksRestOperations.cs @@ -32,7 +32,7 @@ public WebhooksRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-04-01"; + _apiVersion = apiVersion ?? "2025-11-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -334,7 +334,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -367,67 +367,74 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(webhookName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a webhook from a container registry. + /// Updates a webhook with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the webhook. + /// The parameters for updating a webhook. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, webhookName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes a webhook from a container registry. + /// Updates a webhook with the specified parameters. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the webhook. + /// The parameters for updating a webhook. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, webhookName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -443,11 +450,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -461,73 +468,67 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates a webhook with the specified parameters. + /// Deletes a webhook from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the webhook. - /// The parameters for updating a webhook. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, webhookName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, webhookName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates a webhook with the specified parameters. + /// Deletes a webhook from a container registry. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. /// The name of the webhook. - /// The parameters for updating a webhook. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string registryName, string webhookName, ContainerRegistryWebhookPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, registryName, webhookName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, registryName, webhookName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreatePingRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal RequestUriBuilder CreateGetCallbackConfigRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -539,12 +540,12 @@ internal RequestUriBuilder CreatePingRequestUri(string subscriptionId, string re uri.AppendPath(registryName, true); uri.AppendPath("/webhooks/", false); uri.AppendPath(webhookName, true); - uri.AppendPath("/ping", false); + uri.AppendPath("/getCallbackConfig", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreatePingRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal HttpMessage CreateGetCallbackConfigRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -559,7 +560,7 @@ internal HttpMessage CreatePingRequest(string subscriptionId, string resourceGro uri.AppendPath(registryName, true); uri.AppendPath("/webhooks/", false); uri.AppendPath(webhookName, true); - uri.AppendPath("/ping", false); + uri.AppendPath("/getCallbackConfig", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -567,7 +568,7 @@ internal HttpMessage CreatePingRequest(string subscriptionId, string resourceGro return message; } - /// Triggers a ping event to be sent to the webhook. + /// Gets the configuration of service URI and custom headers for the webhook. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. @@ -575,22 +576,22 @@ internal HttpMessage CreatePingRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> PingAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public async Task> GetCallbackConfigAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - using var message = CreatePingRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreateGetCallbackConfigRequest(subscriptionId, resourceGroupName, registryName, webhookName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryWebhookEventInfo value = default; + ContainerRegistryWebhookCallbackConfig value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryWebhookEventInfo.DeserializeContainerRegistryWebhookEventInfo(document.RootElement); + value = ContainerRegistryWebhookCallbackConfig.DeserializeContainerRegistryWebhookCallbackConfig(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -598,7 +599,7 @@ public async Task> PingAsync(string } } - /// Triggers a ping event to be sent to the webhook. + /// Gets the configuration of service URI and custom headers for the webhook. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. @@ -606,22 +607,22 @@ public async Task> PingAsync(string /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Ping(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public Response GetCallbackConfig(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - using var message = CreatePingRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreateGetCallbackConfigRequest(subscriptionId, resourceGroupName, registryName, webhookName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryWebhookEventInfo value = default; + ContainerRegistryWebhookCallbackConfig value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryWebhookEventInfo.DeserializeContainerRegistryWebhookEventInfo(document.RootElement); + value = ContainerRegistryWebhookCallbackConfig.DeserializeContainerRegistryWebhookCallbackConfig(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -731,7 +732,7 @@ public Response ListEvents(string subsc } } - internal RequestUriBuilder CreateGetCallbackConfigRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal RequestUriBuilder CreatePingRequestUri(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -743,12 +744,12 @@ internal RequestUriBuilder CreateGetCallbackConfigRequestUri(string subscription uri.AppendPath(registryName, true); uri.AppendPath("/webhooks/", false); uri.AppendPath(webhookName, true); - uri.AppendPath("/getCallbackConfig", false); + uri.AppendPath("/ping", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetCallbackConfigRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) + internal HttpMessage CreatePingRequest(string subscriptionId, string resourceGroupName, string registryName, string webhookName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -763,7 +764,7 @@ internal HttpMessage CreateGetCallbackConfigRequest(string subscriptionId, strin uri.AppendPath(registryName, true); uri.AppendPath("/webhooks/", false); uri.AppendPath(webhookName, true); - uri.AppendPath("/getCallbackConfig", false); + uri.AppendPath("/ping", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -771,7 +772,7 @@ internal HttpMessage CreateGetCallbackConfigRequest(string subscriptionId, strin return message; } - /// Gets the configuration of service URI and custom headers for the webhook. + /// Triggers a ping event to be sent to the webhook. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. @@ -779,22 +780,22 @@ internal HttpMessage CreateGetCallbackConfigRequest(string subscriptionId, strin /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetCallbackConfigAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public async Task> PingAsync(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - using var message = CreateGetCallbackConfigRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreatePingRequest(subscriptionId, resourceGroupName, registryName, webhookName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ContainerRegistryWebhookCallbackConfig value = default; + ContainerRegistryWebhookEventInfo value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerRegistryWebhookCallbackConfig.DeserializeContainerRegistryWebhookCallbackConfig(document.RootElement); + value = ContainerRegistryWebhookEventInfo.DeserializeContainerRegistryWebhookEventInfo(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -802,7 +803,7 @@ public async Task> GetCallbackC } } - /// Gets the configuration of service URI and custom headers for the webhook. + /// Triggers a ping event to be sent to the webhook. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the container registry. @@ -810,22 +811,22 @@ public async Task> GetCallbackC /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetCallbackConfig(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) + public Response Ping(string subscriptionId, string resourceGroupName, string registryName, string webhookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(registryName, nameof(registryName)); Argument.AssertNotNullOrEmpty(webhookName, nameof(webhookName)); - using var message = CreateGetCallbackConfigRequest(subscriptionId, resourceGroupName, registryName, webhookName); + using var message = CreatePingRequest(subscriptionId, resourceGroupName, registryName, webhookName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ContainerRegistryWebhookCallbackConfig value = default; + ContainerRegistryWebhookEventInfo value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerRegistryWebhookCallbackConfig.DeserializeContainerRegistryWebhookCallbackConfig(document.RootElement); + value = ContainerRegistryWebhookEventInfo.DeserializeContainerRegistryWebhookEventInfo(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs index 3d8c8bc363fe..0d094cebdf31 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string scopeMapNa /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string scopeMapName, CancellationT /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken can /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellationT /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string scopeMapName, Cance /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string scopeMapName, CancellationToken canc /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs index cb37df2b586c..ffeaad6c255e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2025-04-01 + /// 2025-11-01 /// /// /// Resource diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md index 62d5b7184bfb..b30cb3d71637 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/autorest.md @@ -7,7 +7,8 @@ azure-arm: true csharp: true library-name: ContainerRegistry namespace: Azure.ResourceManager.ContainerRegistry -require: https://github.com/Azure/azure-rest-api-specs/blob/a55917cb512540bc3d0aec760d4e28712c3a4ae0/specification/containerregistry/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/46f0876572153f2d941e862613abb95953f71d34/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/readme.md +tag: package-2025-11-dotnetmix output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -20,7 +21,7 @@ modelerfour: use-model-reader-writer: true enable-bicep-serialization: true -#mgmt-debug: +# mgmt-debug: # show-serialized-names: true format-by-name-rules: @@ -267,6 +268,7 @@ rename-mapping: RoleAssignmentMode: ContainerRegistryRoleAssignmentMode ConnectedRegistry.properties.clientTokenIds: -|arm-id ConnectedRegistryUpdateParameters.properties.clientTokenIds: -|arm-id + PrivateLinkResource.properties.requiredZoneNames: RequiredPrivateLinkZoneNames override-operation-name: Schedules_ScheduleRun: ScheduleRun @@ -274,6 +276,10 @@ override-operation-name: Builds_GetBuildSourceUploadUrl: GetBuildSourceUploadUrl directive: + - from: containerregistry_build.json + where: $.info + transform: > + $['title'] = 'ContainerRegistryManagementClient'; # these two renames of operation would make the xml doc incorrect, but currently this is required because now the same operation would contain multiple api-versions if we do not rename. - rename-operation: from: Registries_GetBuildSourceUploadUrl @@ -281,32 +287,18 @@ directive: - rename-operation: from: Registries_ScheduleRun to: Schedules_ScheduleRun - - from: swagger-document - where: $.definitions - transform: > - $.IdentityProperties.properties.principalId.readOnly = true; - $.IdentityProperties.properties.tenantId.readOnly = true; - $.UserIdentityProperties.properties.principalId.readOnly = true; - $.UserIdentityProperties.properties.clientId.readOnly = true; - - from: containerregistry.json - where: $.definitions - transform: > - $.LoginServerProperties.properties.tls = { - "$ref": "#/definitions/TlsProperties", - "description": "The TLS properties of the connected registry login server.", - "readOnly": true - }; - $.TlsProperties.properties.certificate = { - "$ref": "#/definitions/TlsCertificateProperties", - "description": "The certificate used to configure HTTPS for the login server.", - "readOnly": true - }; - from: swagger-document where: $.definitions..expiry transform: > $['x-ms-client-name'] = 'ExpireOn'; - - from: types.json - where: $.parameters.SubscriptionIdParameter.format - transform: > - return undefined; +``` + +### Tag: package-2025-11-dotnetmix + +These settings apply only when `--tag=package-2025-11-dotnetmix` is specified on the command line. + +``` yaml $(tag) == 'package-2025-11-dotnetmix' +input-file: + - https://github.com/kazrael2119/azure-rest-api-specs/tree/46f0876572153f2d941e862613abb95953f71d34/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/containerregistry.json + - https://github.com/kazrael2119/azure-rest-api-specs/tree/46f0876572153f2d941e862613abb95953f71d34/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/containerregistry_build.json ``` diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryCollection.cs index 3675d11bf38e..cd3fe35901b6 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ConnectedRegistryCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ConnectedRegistryCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryCreate.json // this example is just showing the usage of "ConnectedRegistries_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task CreateOrUpdate_ConnectedRegistryCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task Get_ConnectedRegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ConnectedRegistryList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryList.json // this example is just showing the usage of "ConnectedRegistries_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task GetAll_ConnectedRegistryList() [Ignore("Only validating compilation of examples")] public async Task Exists_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task Exists_ConnectedRegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryResource.cs index c1d32285195b..ef0ddca0e9c2 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ConnectedRegistryResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ConnectedRegistryResource [Ignore("Only validating compilation of examples")] public async Task Get_ConnectedRegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryGet.json // this example is just showing the usage of "ConnectedRegistries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_ConnectedRegistryGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ConnectedRegistryDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryDelete.json // this example is just showing the usage of "ConnectedRegistries_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Delete_ConnectedRegistryDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ConnectedRegistryUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryUpdate.json // this example is just showing the usage of "ConnectedRegistries_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task Update_ConnectedRegistryUpdate() [Ignore("Only validating compilation of examples")] public async Task Deactivate_ConnectedRegistryDeactivate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ConnectedRegistryDeactivate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ConnectedRegistryDeactivate.json // this example is just showing the usage of "ConnectedRegistries_Deactivate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs index ad75e750ca85..c4322939cfd1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryAgentPoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AgentPoolsCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/AgentPoolsCreate.json // this example is just showing the usage of "AgentPools_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_AgentPoolsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Get_AgentPoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_AgentPoolsList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/AgentPoolsList.json // this example is just showing the usage of "AgentPools_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task GetAll_AgentPoolsList() [Ignore("Only validating compilation of examples")] public async Task Exists_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task Exists_AgentPoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs index 5ffb01eff778..aaf6f0ee5462 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryAgentPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryAgentPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_AgentPoolsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/AgentPoolsGet.json // this example is just showing the usage of "AgentPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_AgentPoolsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_AgentPoolsDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/AgentPoolsDelete.json // this example is just showing the usage of "AgentPools_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_AgentPoolsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AgentPoolsUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/AgentPoolsUpdate.json // this example is just showing the usage of "AgentPools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_AgentPoolsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetQueueStatus_AgentPoolsGetQueueStatus() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/AgentPoolsGetQueueStatus.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/AgentPoolsGetQueueStatus.json // this example is just showing the usage of "AgentPools_GetQueueStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs index e9e064a461f5..82bdaf72f16f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryCacheRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CacheRuleCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleCreate.json // this example is just showing the usage of "CacheRules_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_CacheRuleCreate() [Ignore("Only validating compilation of examples")] public async Task Get_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_CacheRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CacheRuleList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleList.json // this example is just showing the usage of "CacheRules_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task GetAll_CacheRuleList() [Ignore("Only validating compilation of examples")] public async Task Exists_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Exists_CacheRuleGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs index a6831a1cc2bc..1e5d025fa2d8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCacheRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryCacheRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_CacheRuleGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleGet.json // this example is just showing the usage of "CacheRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_CacheRuleGet() [Ignore("Only validating compilation of examples")] public async Task Delete_CacheRuleDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleDelete.json // this example is just showing the usage of "CacheRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_CacheRuleDelete() [Ignore("Only validating compilation of examples")] public async Task Update_CacheRuleUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CacheRuleUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CacheRuleUpdate.json // this example is just showing the usage of "CacheRules_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCollection.cs index ce02908cbf4a..57249fb59679 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerRegistryCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RegistryCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryCreate.json // this example is just showing the usage of "Registries_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,11 +59,53 @@ public async Task CreateOrUpdate_RegistryCreate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegistryCreateAbac() + { + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryCreateAbac.json + // this example is just showing the usage of "Registries_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ContainerRegistryResource + ContainerRegistryCollection collection = resourceGroupResource.GetContainerRegistries(); + + // invoke the operation + string registryName = "myRegistry"; + ContainerRegistryData data = new ContainerRegistryData(new AzureLocation("westus"), new ContainerRegistrySku(ContainerRegistrySkuName.Standard)) + { + RoleAssignmentMode = ContainerRegistryRoleAssignmentMode.AbacRepositoryPermissions, + Tags = +{ +["key"] = "value" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, registryName, data); + ContainerRegistryResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerRegistryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RegistryCreateZoneRedundant() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCreateZoneRedundant.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryCreateZoneRedundant.json // this example is just showing the usage of "Registries_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +147,7 @@ public async Task CreateOrUpdate_RegistryCreateZoneRedundant() [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +180,7 @@ public async Task Get_RegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RegistryListByResourceGroup() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListByResourceGroup.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryListByResourceGroup.json // this example is just showing the usage of "Registries_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +215,7 @@ public async Task GetAll_RegistryListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +244,7 @@ public async Task Exists_RegistryGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs index 1ae1de6aa41a..768f2b8a0a8b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerRegistryCredentialSetCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CredentialSetCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetCreate.json // this example is just showing the usage of "CredentialSets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -67,7 +67,7 @@ public async Task CreateOrUpdate_CredentialSetCreate() [Ignore("Only validating compilation of examples")] public async Task Get_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Get_CredentialSetGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CredentialSetList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetList.json // this example is just showing the usage of "CredentialSets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -137,7 +137,7 @@ public async Task GetAll_CredentialSetList() [Ignore("Only validating compilation of examples")] public async Task Exists_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task Exists_CredentialSetGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs index 86ab0f3a2022..e1eaa6bbbf22 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryCredentialSetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryCredentialSetResource [Ignore("Only validating compilation of examples")] public async Task Get_CredentialSetGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetGet.json // this example is just showing the usage of "CredentialSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_CredentialSetGet() [Ignore("Only validating compilation of examples")] public async Task Delete_CredentialSetDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetDelete.json // this example is just showing the usage of "CredentialSets_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_CredentialSetDelete() [Ignore("Only validating compilation of examples")] public async Task Update_CredentialSetUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/CredentialSetUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/CredentialSetUpdate.json // this example is just showing the usage of "CredentialSets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs index a633bde35f15..acd6af11860f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PrivateEndpointConnectionCreateOrUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionCreateOrUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionCreateOrUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Get_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_PrivateEndpointConnectionList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionList.json // this example is just showing the usage of "PrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task GetAll_PrivateEndpointConnectionList() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs index de65b4e120d2..fdd6f698e8ab 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PrivateEndpointConnectionDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionDelete.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_PrivateEndpointConnectionDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PrivateEndpointConnectionCreateOrUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/PrivateEndpointConnectionCreateOrUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/PrivateEndpointConnectionCreateOrUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs index c906bc8b96d2..f39c8440512a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryPrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs index a74a5378fb89..57146e061bc1 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryPrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryPrivateLinkResourceCollection [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_RegistryGetPrivateLinkResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_RegistryListPrivateLinkResources() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListPrivateLinkResources.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryListPrivateLinkResources.json // this example is just showing the usage of "Registries_ListPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_RegistryListPrivateLinkResources() [Ignore("Only validating compilation of examples")] public async Task Exists_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Exists_RegistryGetPrivateLinkResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RegistryGetPrivateLinkResource() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGetPrivateLinkResource.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGetPrivateLinkResource.json // this example is just showing the usage of "Registries_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs index 5da404b83029..1f0e86bbfb0b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryReplicationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ReplicationCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationCreate.json // this example is just showing the usage of "Replications_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task CreateOrUpdate_ReplicationCreate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ReplicationCreateZoneRedundant() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationCreateZoneRedundant.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationCreateZoneRedundant.json // this example is just showing the usage of "Replications_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task CreateOrUpdate_ReplicationCreateZoneRedundant() [Ignore("Only validating compilation of examples")] public async Task Get_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task Get_ReplicationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ReplicationList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationList.json // this example is just showing the usage of "Replications_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task GetAll_ReplicationList() [Ignore("Only validating compilation of examples")] public async Task Exists_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +206,7 @@ public async Task Exists_ReplicationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs index 9a01b6745dbd..ca6f77306232 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryReplicationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryReplicationResource [Ignore("Only validating compilation of examples")] public async Task Get_ReplicationGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationGet.json // this example is just showing the usage of "Replications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_ReplicationGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ReplicationDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationDelete.json // this example is just showing the usage of "Replications_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_ReplicationDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ReplicationUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ReplicationUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ReplicationUpdate.json // this example is just showing the usage of "Replications_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryResource.cs index 098d0c266f70..4f3428958680 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryResource [Ignore("Only validating compilation of examples")] public async Task Get_RegistryGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGet.json // this example is just showing the usage of "Registries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_RegistryGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RegistryDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryDelete.json // this example is just showing the usage of "Registries_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_RegistryDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RegistryUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryUpdate.json // this example is just showing the usage of "Registries_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,6 +101,7 @@ public async Task Update_RegistryUpdate() }, Sku = new ContainerRegistrySku(ContainerRegistrySkuName.Standard), IsAdminUserEnabled = true, + RoleAssignmentMode = ContainerRegistryRoleAssignmentMode.AbacRepositoryPermissions, }; ArmOperation lro = await containerRegistry.UpdateAsync(WaitUntil.Completed, patch); ContainerRegistryResource result = lro.Value; @@ -112,11 +113,43 @@ public async Task Update_RegistryUpdate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GenerateCredentials_RegistryGenerateCredentials() + { + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryGenerateCredentials.json + // this example is just showing the usage of "Registries_GenerateCredentials" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerRegistryResource created on azure + // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string registryName = "myRegistry"; + ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); + + // invoke the operation + ContainerRegistryGenerateCredentialsContent content = new ContainerRegistryGenerateCredentialsContent + { + TokenId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken"), + ExpireOn = DateTimeOffset.Parse("2020-12-31T15:59:59.0707808Z"), + }; + ArmOperation lro = await containerRegistry.GenerateCredentialsAsync(WaitUntil.Completed, content); + ContainerRegistryGenerateCredentialsResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task ImportImage_ImportImageByManifestDigest() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ImportImageByManifestDigest.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ImportImageByManifestDigest.json // this example is just showing the usage of "Registries_ImportImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +184,7 @@ public async Task ImportImage_ImportImageByManifestDigest() [Ignore("Only validating compilation of examples")] public async Task ImportImage_ImportImageByTag() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ImportImageByTag.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ImportImageByTag.json // this example is just showing the usage of "Registries_ImportImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -186,7 +219,7 @@ public async Task ImportImage_ImportImageByTag() [Ignore("Only validating compilation of examples")] public async Task ImportImage_ImportImageFromPublicRegistry() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ImportImageFromPublicRegistry.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ImportImageFromPublicRegistry.json // this example is just showing the usage of "Registries_ImportImage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -219,10 +252,10 @@ public async Task ImportImage_ImportImageFromPublicRegistry() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetUsages_RegistryListUsages() + public async Task GetCredentials_RegistryListCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListUsages.json - // this example is just showing the usage of "Registries_ListUsages" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryListCredentials.json + // this example is just showing the usage of "Registries_ListCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -237,21 +270,18 @@ public async Task GetUsages_RegistryListUsages() ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - // invoke the operation and iterate over the result - await foreach (ContainerRegistryUsage item in containerRegistry.GetUsagesAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + ContainerRegistryListCredentialsResult result = await containerRegistry.GetCredentialsAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetCredentials_RegistryListCredentials() + public async Task GetUsages_RegistryListUsages() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryListCredentials.json - // this example is just showing the usage of "Registries_ListCredentials" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryListUsages.json + // this example is just showing the usage of "Registries_ListUsages" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -266,17 +296,20 @@ public async Task GetCredentials_RegistryListCredentials() ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - // invoke the operation - ContainerRegistryListCredentialsResult result = await containerRegistry.GetCredentialsAsync(); + // invoke the operation and iterate over the result + await foreach (ContainerRegistryUsage item in containerRegistry.GetUsagesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] public async Task RegenerateCredential_RegistryRegenerateCredential() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryRegenerateCredential.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryRegenerateCredential.json // this example is just showing the usage of "Registries_RegenerateCredential" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -301,10 +334,10 @@ public async Task RegenerateCredential_RegistryRegenerateCredential() [Test] [Ignore("Only validating compilation of examples")] - public async Task GenerateCredentials_RegistryGenerateCredentials() + public async Task GetBuildSourceUploadUrl_RegistriesGetBuildSourceUploadUrl() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryGenerateCredentials.json - // this example is just showing the usage of "Registries_GenerateCredentials" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RegistriesGetBuildSourceUploadUrl.json + // this example is just showing the usage of "Builds_GetBuildSourceUploadUrl" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -313,20 +346,14 @@ public async Task GenerateCredentials_RegistryGenerateCredentials() // this example assumes you already have this ContainerRegistryResource created on azure // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string subscriptionId = "4385cf00-2d3a-425a-832f-f4285b1c9dce"; string resourceGroupName = "myResourceGroup"; string registryName = "myRegistry"; ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); // invoke the operation - ContainerRegistryGenerateCredentialsContent content = new ContainerRegistryGenerateCredentialsContent - { - TokenId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tokens/myToken"), - ExpireOn = DateTimeOffset.Parse("2020-12-31T15:59:59.0707808Z"), - }; - ArmOperation lro = await containerRegistry.GenerateCredentialsAsync(WaitUntil.Completed, content); - ContainerRegistryGenerateCredentialsResult result = lro.Value; + SourceUploadDefinition result = await containerRegistry.GetBuildSourceUploadUrlAsync(); Console.WriteLine($"Succeeded: {result}"); } @@ -335,7 +362,7 @@ public async Task GenerateCredentials_RegistryGenerateCredentials() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRun() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RegistriesScheduleRun.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -371,8 +398,7 @@ public async Task ScheduleRun_RegistriesScheduleRun() SourceLocation = "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D", IsArchiveEnabled = true, }; - ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); - ContainerRegistryRunResource result = lro.Value; + ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -385,7 +411,7 @@ public async Task ScheduleRun_RegistriesScheduleRun() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunEncodedTaskRun() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_EncodedTaskRun.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RegistriesScheduleRun_EncodedTaskRun.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -414,8 +440,7 @@ public async Task ScheduleRun_RegistriesScheduleRunEncodedTaskRun() }}, AgentCpu = 2, }; - ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); - ContainerRegistryRunResource result = lro.Value; + ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -428,7 +453,7 @@ public async Task ScheduleRun_RegistriesScheduleRunEncodedTaskRun() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunFileTaskRun() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTaskRun.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RegistriesScheduleRun_FileTaskRun.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -458,8 +483,7 @@ public async Task ScheduleRun_RegistriesScheduleRunFileTaskRun() AgentCpu = 2, SourceLocation = "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D", }; - ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); - ContainerRegistryRunResource result = lro.Value; + ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -472,7 +496,7 @@ public async Task ScheduleRun_RegistriesScheduleRunFileTaskRun() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunTask() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_Task.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RegistriesScheduleRun_Task.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -512,8 +536,7 @@ public async Task ScheduleRun_RegistriesScheduleRunTask() UpdateTriggerToken = "aGVsbG8gd29ybGQ=", }, }; - ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); - ContainerRegistryRunResource result = lro.Value; + ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -526,7 +549,7 @@ public async Task ScheduleRun_RegistriesScheduleRunTask() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunTaskWithCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_FileTask_WithCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RegistriesScheduleRun_FileTask_WithCustomCredentials.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -554,7 +577,10 @@ public async Task ScheduleRun_RegistriesScheduleRunTaskWithCustomCredentials() }}, Credentials = new ContainerRegistryCredentials { - SourceRegistryLoginMode = SourceRegistryLoginMode.Default, + SourceRegistry = new SourceRegistryCredentials + { + LoginMode = SourceRegistryLoginMode.Default, + }, CustomRegistries = { ["myregistry.azurecr.io"] = new CustomRegistryCredentials @@ -573,8 +599,7 @@ public async Task ScheduleRun_RegistriesScheduleRunTaskWithCustomCredentials() }, }, }; - ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); - ContainerRegistryRunResource result = lro.Value; + ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -587,7 +612,7 @@ public async Task ScheduleRun_RegistriesScheduleRunTaskWithCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunWithCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RegistriesScheduleRun_WithCustomCredentials.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -624,7 +649,10 @@ public async Task ScheduleRun_RegistriesScheduleRunWithCustomCredentials() SourceLocation = "https://myaccount.blob.core.windows.net/sascontainer/source.zip?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D", Credentials = new ContainerRegistryCredentials { - SourceRegistryLoginMode = SourceRegistryLoginMode.Default, + SourceRegistry = new SourceRegistryCredentials + { + LoginMode = SourceRegistryLoginMode.Default, + }, CustomRegistries = { ["myregistry.azurecr.io"] = new CustomRegistryCredentials @@ -657,8 +685,7 @@ public async Task ScheduleRun_RegistriesScheduleRunWithCustomCredentials() }, IsArchiveEnabled = true, }; - ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); - ContainerRegistryRunResource result = lro.Value; + ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -671,7 +698,7 @@ public async Task ScheduleRun_RegistriesScheduleRunWithCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task ScheduleRun_RegistriesScheduleRunWithLogTemplate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesScheduleRun_WithLogTemplate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RegistriesScheduleRun_WithLogTemplate.json // this example is just showing the usage of "Schedules_ScheduleRun" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -708,8 +735,7 @@ public async Task ScheduleRun_RegistriesScheduleRunWithLogTemplate() IsArchiveEnabled = true, LogTemplate = "acr/tasks:{{.Run.OS}}", }; - ArmOperation lro = await containerRegistry.ScheduleRunAsync(WaitUntil.Completed, content); - ContainerRegistryRunResource result = lro.Value; + ContainerRegistryRunResource result = await containerRegistry.ScheduleRunAsync(content); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -717,31 +743,5 @@ public async Task ScheduleRun_RegistriesScheduleRunWithLogTemplate() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetBuildSourceUploadUrl_RegistriesGetBuildSourceUploadUrl() - { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RegistriesGetBuildSourceUploadUrl.json - // this example is just showing the usage of "Builds_GetBuildSourceUploadUrl" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ContainerRegistryResource created on azure - // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource - string subscriptionId = "4385cf00-2d3a-425a-832f-f4285b1c9dce"; - string resourceGroupName = "myResourceGroup"; - string registryName = "myRegistry"; - ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); - ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); - - // invoke the operation - SourceUploadDefinition result = await containerRegistry.GetBuildSourceUploadUrlAsync(); - - Console.WriteLine($"Succeeded: {result}"); - } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunCollection.cs index e356684afd7d..05a81ae3a782 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ContainerRegistryRunCollection [Ignore("Only validating compilation of examples")] public async Task Get_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_RunsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RunsList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RunsList.json // this example is just showing the usage of "Runs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task GetAll_RunsList() [Ignore("Only validating compilation of examples")] public async Task Exists_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_RunsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunResource.cs index a17617db5d2b..6db4100b4e9b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryRunResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryRunResource [Ignore("Only validating compilation of examples")] public async Task Get_RunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RunsGet.json // this example is just showing the usage of "Runs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_RunsGet() [Ignore("Only validating compilation of examples")] public async Task Update_RunsUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RunsUpdate.json // this example is just showing the usage of "Runs_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,8 +73,7 @@ public async Task Update_RunsUpdate() { IsArchiveEnabled = true, }; - ArmOperation lro = await containerRegistryRun.UpdateAsync(WaitUntil.Completed, patch); - ContainerRegistryRunResource result = lro.Value; + ContainerRegistryRunResource result = await containerRegistryRun.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -85,10 +84,10 @@ public async Task Update_RunsUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetLogSasUrl_RunsGetLogSasUrl() + public async Task Cancel_RunsCancel() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsGetLogSasUrl.json - // this example is just showing the usage of "Runs_GetLogSasUrl" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RunsCancel.json + // this example is just showing the usage of "Runs_Cancel" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -105,17 +104,17 @@ public async Task GetLogSasUrl_RunsGetLogSasUrl() ContainerRegistryRunResource containerRegistryRun = client.GetContainerRegistryRunResource(containerRegistryRunResourceId); // invoke the operation - ContainerRegistryRunGetLogResult result = await containerRegistryRun.GetLogSasUrlAsync(); + await containerRegistryRun.CancelAsync(); - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Cancel_RunsCancel() + public async Task GetLogSasUrl_RunsGetLogSasUrl() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/RunsCancel.json - // this example is just showing the usage of "Runs_Cancel" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/RunsGetLogSasUrl.json + // this example is just showing the usage of "Runs_GetLogSasUrl" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -132,9 +131,9 @@ public async Task Cancel_RunsCancel() ContainerRegistryRunResource containerRegistryRun = client.GetContainerRegistryRunResource(containerRegistryRunResourceId); // invoke the operation - await containerRegistryRun.CancelAsync(WaitUntil.Completed); + ContainerRegistryRunGetLogResult result = await containerRegistryRun.GetLogSasUrlAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs index 66b716680736..a1dadbc99834 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ContainerRegistryTaskCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksCreate.json // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task CreateOrUpdate_TasksCreate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateQuickTask() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksCreate_QuickTask.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksCreate_QuickTask.json // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,11 +142,93 @@ public async Task CreateOrUpdate_TasksCreateQuickTask() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_TasksCreateWithLoginIdentity() + { + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/ManagedIdentity/TasksCreate_WithLoginIdentity.json + // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerRegistryResource created on azure + // for more information of creating ContainerRegistryResource, please refer to the document of ContainerRegistryResource + string subscriptionId = "4385cf00-2d3a-425a-832f-f4285b1c9dce"; + string resourceGroupName = "myResourceGroup"; + string registryName = "myRegistry"; + ResourceIdentifier containerRegistryResourceId = ContainerRegistryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName); + ContainerRegistryResource containerRegistry = client.GetContainerRegistryResource(containerRegistryResourceId); + + // get the collection of this ContainerRegistryTaskResource + ContainerRegistryTaskCollection collection = containerRegistry.GetContainerRegistryTasks(); + + // invoke the operation + string taskName = "mytTask"; + ContainerRegistryTaskData data = new ContainerRegistryTaskData(new AzureLocation("eastus")) + { + Identity = new ManagedServiceIdentity("SystemAssigned"), + Status = ContainerRegistryTaskStatus.Enabled, + Platform = new ContainerRegistryPlatformProperties(ContainerRegistryOS.Linux) + { + Architecture = ContainerRegistryOSArchitecture.Amd64, + }, + AgentCpu = 2, + Step = new ContainerRegistryDockerBuildStep("src/DockerFile") + { + ImageNames = { "azurerest:testtag" }, + IsPushEnabled = true, + NoCache = false, + Arguments = {new ContainerRegistryRunArgument("mytestargument", "mytestvalue") +{ +IsSecret = false, +}, new ContainerRegistryRunArgument("mysecrettestargument", "mysecrettestvalue") +{ +IsSecret = true, +}}, + ContextPath = "src", + }, + Trigger = new ContainerRegistryTriggerProperties + { + TimerTriggers = { new ContainerRegistryTimerTrigger("30 9 * * 1-5", "myTimerTrigger") }, + SourceTriggers = {new ContainerRegistrySourceTrigger(new SourceCodeRepoProperties(SourceControlType.Github, new Uri("https://github.com/Azure/azure-rest-api-specs")) +{ +Branch = "master", +SourceControlAuthProperties = new SourceCodeRepoAuthInfo(SourceCodeRepoAuthTokenType.Pat, "xxxxx"), +}, new ContainerRegistrySourceTriggerEvent[]{ContainerRegistrySourceTriggerEvent.Commit}, "mySourceTrigger")}, + BaseImageTrigger = new ContainerRegistryBaseImageTrigger(ContainerRegistryBaseImageTriggerType.Runtime, "myBaseImageTrigger"), + }, + Credentials = new ContainerRegistryCredentials + { + SourceRegistry = new SourceRegistryCredentials + { + Identity = "[system]", + }, + }, + LogTemplate = null, + IsSystemTask = false, + Tags = +{ +["testkey"] = "value" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, taskName, data); + ContainerRegistryTaskResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerRegistryTaskData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateWithSystemAndUserIdentities() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemAndUserIdentities.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemAndUserIdentities.json // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -231,7 +313,7 @@ public async Task CreateOrUpdate_TasksCreateWithSystemAndUserIdentities() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateWithUserIdentities() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithUserIdentities.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/ManagedIdentity/TasksCreate_WithUserIdentities.json // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -317,7 +399,7 @@ public async Task CreateOrUpdate_TasksCreateWithUserIdentities() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TasksCreateWithUserIdentitiesWithSystemIdentity() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemIdentity.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/ManagedIdentity/TasksCreate_WithSystemIdentity.json // this example is just showing the usage of "Tasks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -392,7 +474,7 @@ public async Task CreateOrUpdate_TasksCreateWithUserIdentitiesWithSystemIdentity [Ignore("Only validating compilation of examples")] public async Task Get_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -426,7 +508,7 @@ public async Task Get_TasksGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TasksList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksList.json // this example is just showing the usage of "Tasks_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -462,7 +544,7 @@ public async Task GetAll_TasksList() [Ignore("Only validating compilation of examples")] public async Task Exists_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -492,7 +574,7 @@ public async Task Exists_TasksGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskResource.cs index f9127b8a0587..57ddefd8849e 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTaskResource [Ignore("Only validating compilation of examples")] public async Task Get_TasksGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksGet.json // this example is just showing the usage of "Tasks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_TasksGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TasksDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksDelete.json // this example is just showing the usage of "Tasks_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_TasksDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksUpdate.json // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,8 +146,7 @@ public async Task Update_TasksUpdate() }, LogTemplate = "acr/tasks:{{.Run.OS}}", }; - ArmOperation lro = await containerRegistryTask.UpdateAsync(WaitUntil.Completed, patch); - ContainerRegistryTaskResource result = lro.Value; + ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -160,7 +159,7 @@ public async Task Update_TasksUpdate() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateQuickTask() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate_QuickTask.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksUpdate_QuickTask.json // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,8 +186,7 @@ public async Task Update_TasksUpdateQuickTask() Status = ContainerRegistryTaskStatus.Enabled, LogTemplate = "acr/tasks:{{.Run.OS}}", }; - ArmOperation lro = await containerRegistryTask.UpdateAsync(WaitUntil.Completed, patch); - ContainerRegistryTaskResource result = lro.Value; + ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -201,7 +199,7 @@ public async Task Update_TasksUpdateQuickTask() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateWithKeyVaultCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithKeyVaultCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/ManagedIdentity/TasksUpdate_WithKeyVaultCustomCredentials.json // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -269,8 +267,75 @@ public async Task Update_TasksUpdateWithKeyVaultCustomCredentials() }, LogTemplate = null, }; - ArmOperation lro = await containerRegistryTask.UpdateAsync(WaitUntil.Completed, patch); - ContainerRegistryTaskResource result = lro.Value; + ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ContainerRegistryTaskData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_TasksUpdateWithLoginIdentity() + { + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/ManagedIdentity/TasksUpdate_WithLoginIdentity.json + // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ContainerRegistryTaskResource created on azure + // for more information of creating ContainerRegistryTaskResource, please refer to the document of ContainerRegistryTaskResource + string subscriptionId = "4385cf00-2d3a-425a-832f-f4285b1c9dce"; + string resourceGroupName = "myResourceGroup"; + string registryName = "myRegistry"; + string taskName = "myTask"; + ResourceIdentifier containerRegistryTaskResourceId = ContainerRegistryTaskResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, registryName, taskName); + ContainerRegistryTaskResource containerRegistryTask = client.GetContainerRegistryTaskResource(containerRegistryTaskResourceId); + + // invoke the operation + ContainerRegistryTaskPatch patch = new ContainerRegistryTaskPatch + { + Tags = +{ +["testkey"] = "value" +}, + Status = ContainerRegistryTaskStatus.Enabled, + AgentCpu = 3, + Step = new ContainerRegistryDockerBuildStepUpdateContent + { + ImageNames = { "azurerest:testtag1" }, + DockerFilePath = "src/DockerFile", + }, + Trigger = new ContainerRegistryTriggerUpdateContent + { + SourceTriggers = {new ContainerRegistrySourceTriggerUpdateContent("mySourceTrigger") +{ +SourceRepository = new SourceCodeRepoUpdateContent +{ +SourceControlAuthProperties = new SourceCodeRepoAuthInfoUpdateContent +{ +TokenType = SourceCodeRepoAuthTokenType.Pat, +Token = "xxxxx", +}, +}, +SourceTriggerEvents = {ContainerRegistrySourceTriggerEvent.Commit}, +}}, + }, + Credentials = new ContainerRegistryCredentials + { + SourceRegistry = new SourceRegistryCredentials + { + Identity = "[system]", + }, + }, + LogTemplate = null, + }; + ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -283,7 +348,7 @@ public async Task Update_TasksUpdateWithKeyVaultCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateWithMSICustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/ManagedIdentity/TasksUpdate_WithMSICustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/ManagedIdentity/TasksUpdate_WithMSICustomCredentials.json // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -341,8 +406,7 @@ public async Task Update_TasksUpdateWithMSICustomCredentials() }, LogTemplate = null, }; - ArmOperation lro = await containerRegistryTask.UpdateAsync(WaitUntil.Completed, patch); - ContainerRegistryTaskResource result = lro.Value; + ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -355,7 +419,7 @@ public async Task Update_TasksUpdateWithMSICustomCredentials() [Ignore("Only validating compilation of examples")] public async Task Update_TasksUpdateWithOpaqueCustomCredentials() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksUpdate_WithOpaqueCustomCredentials.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksUpdate_WithOpaqueCustomCredentials.json // this example is just showing the usage of "Tasks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -422,8 +486,7 @@ public async Task Update_TasksUpdateWithOpaqueCustomCredentials() }, LogTemplate = null, }; - ArmOperation lro = await containerRegistryTask.UpdateAsync(WaitUntil.Completed, patch); - ContainerRegistryTaskResource result = lro.Value; + ContainerRegistryTaskResource result = await containerRegistryTask.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -436,7 +499,7 @@ public async Task Update_TasksUpdateWithOpaqueCustomCredentials() [Ignore("Only validating compilation of examples")] public async Task GetDetails_TasksGetDetails() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TasksGetDetails.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TasksGetDetails.json // this example is just showing the usage of "Tasks_GetDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs index 48ec6347c2c4..a20aeb22bc79 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTaskRunCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TaskRunsCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TaskRunsCreate.json // this example is just showing the usage of "TaskRuns_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_TaskRunsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Get_TaskRunsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TaskRunsList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TaskRunsList.json // this example is just showing the usage of "TaskRuns_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task GetAll_TaskRunsList() [Ignore("Only validating compilation of examples")] public async Task Exists_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Exists_TaskRunsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs index 8e460c768aaa..fde7194b12c7 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTaskRunResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTaskRunResource [Ignore("Only validating compilation of examples")] public async Task Get_TaskRunsGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TaskRunsGet.json // this example is just showing the usage of "TaskRuns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_TaskRunsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TaskRunsDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TaskRunsDelete.json // this example is just showing the usage of "TaskRuns_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_TaskRunsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TaskRunsUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TaskRunsUpdate.json // this example is just showing the usage of "TaskRuns_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Update_TaskRunsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetDetails_TaskRunsGetDetails() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/preview/2019-06-01-preview/examples/TaskRunsGetDetails.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/preview/2025-03-01-preview/examples/TaskRunsGetDetails.json // this example is just showing the usage of "TaskRuns_GetDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs index cf1eac36fb10..09e29819351b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTokenCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TokenCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenCreate.json // this example is just showing the usage of "Tokens_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_TokenCreate() [Ignore("Only validating compilation of examples")] public async Task Get_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Get_TokenGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TokenList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenList.json // this example is just showing the usage of "Tokens_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task GetAll_TokenList() [Ignore("Only validating compilation of examples")] public async Task Exists_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Exists_TokenGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenResource.cs index 69720c6629fb..6291a1ead86f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryTokenResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryTokenResource [Ignore("Only validating compilation of examples")] public async Task Get_TokenGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenGet.json // this example is just showing the usage of "Tokens_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_TokenGet() [Ignore("Only validating compilation of examples")] public async Task Delete_TokenDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenDelete.json // this example is just showing the usage of "Tokens_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_TokenDelete() [Ignore("Only validating compilation of examples")] public async Task Update_TokenUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/TokenUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/TokenUpdate.json // this example is just showing the usage of "Tokens_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs index accba0ea9b21..8fe067de0d6f 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryWebhookCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_WebhookCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookCreate.json // this example is just showing the usage of "Webhooks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task CreateOrUpdate_WebhookCreate() [Ignore("Only validating compilation of examples")] public async Task Get_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,7 +104,7 @@ public async Task Get_WebhookGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_WebhookList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookList.json // this example is just showing the usage of "Webhooks_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task GetAll_WebhookList() [Ignore("Only validating compilation of examples")] public async Task Exists_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task Exists_WebhookGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs index 2ab59c7ff1e4..e6a5cd991653 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ContainerRegistryWebhookResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ContainerRegistryWebhookResource [Ignore("Only validating compilation of examples")] public async Task Get_WebhookGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookGet.json // this example is just showing the usage of "Webhooks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_WebhookGet() [Ignore("Only validating compilation of examples")] public async Task Delete_WebhookDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookDelete.json // this example is just showing the usage of "Webhooks_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_WebhookDelete() [Ignore("Only validating compilation of examples")] public async Task Update_WebhookUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookUpdate.json // this example is just showing the usage of "Webhooks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,10 +123,10 @@ public async Task Update_WebhookUpdate() [Test] [Ignore("Only validating compilation of examples")] - public async Task Ping_WebhookPing() + public async Task GetCallbackConfig_WebhookGetCallbackConfig() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookPing.json - // this example is just showing the usage of "Webhooks_Ping" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookGetCallbackConfig.json + // this example is just showing the usage of "Webhooks_GetCallbackConfig" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -143,7 +143,7 @@ public async Task Ping_WebhookPing() ContainerRegistryWebhookResource containerRegistryWebhook = client.GetContainerRegistryWebhookResource(containerRegistryWebhookResourceId); // invoke the operation - ContainerRegistryWebhookEventInfo result = await containerRegistryWebhook.PingAsync(); + ContainerRegistryWebhookCallbackConfig result = await containerRegistryWebhook.GetCallbackConfigAsync(); Console.WriteLine($"Succeeded: {result}"); } @@ -152,7 +152,7 @@ public async Task Ping_WebhookPing() [Ignore("Only validating compilation of examples")] public async Task GetEvents_WebhookListEvents() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookListEvents.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookListEvents.json // this example is just showing the usage of "Webhooks_ListEvents" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,10 +180,10 @@ public async Task GetEvents_WebhookListEvents() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetCallbackConfig_WebhookGetCallbackConfig() + public async Task Ping_WebhookPing() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/WebhookGetCallbackConfig.json - // this example is just showing the usage of "Webhooks_GetCallbackConfig" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/WebhookPing.json + // this example is just showing the usage of "Webhooks_Ping" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -200,7 +200,7 @@ public async Task GetCallbackConfig_WebhookGetCallbackConfig() ContainerRegistryWebhookResource containerRegistryWebhook = client.GetContainerRegistryWebhookResource(containerRegistryWebhookResourceId); // invoke the operation - ContainerRegistryWebhookCallbackConfig result = await containerRegistryWebhook.GetCallbackConfigAsync(); + ContainerRegistryWebhookEventInfo result = await containerRegistryWebhook.PingAsync(); Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapCollection.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapCollection.cs index 3d8e42b903aa..604970752193 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapCollection.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ScopeMapCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ScopeMapCreate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapCreate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapCreate.json // this example is just showing the usage of "ScopeMaps_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_ScopeMapCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ScopeMapGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ScopeMapList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapList.json // this example is just showing the usage of "ScopeMaps_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_ScopeMapList() [Ignore("Only validating compilation of examples")] public async Task Exists_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Exists_ScopeMapGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapResource.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapResource.cs index e39d51f6bd24..0e5cf32811de 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapResource.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_ScopeMapResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ScopeMapResource [Ignore("Only validating compilation of examples")] public async Task Get_ScopeMapGet() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapGet.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapGet.json // this example is just showing the usage of "ScopeMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_ScopeMapGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ScopeMapDelete() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapDelete.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapDelete.json // this example is just showing the usage of "ScopeMaps_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_ScopeMapDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ScopeMapUpdate() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/ScopeMapUpdate.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/ScopeMapUpdate.json // this example is just showing the usage of "ScopeMaps_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index b7b460769375..7003ab6f2e12 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameAvailable() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCheckNameAvailable.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryCheckNameAvailable.json // this example is just showing the usage of "Registries_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,7 +46,7 @@ public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameAvaila [Ignore("Only validating compilation of examples")] public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameNotAvailable() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryCheckNameNotAvailable.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryCheckNameNotAvailable.json // this example is just showing the usage of "Registries_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -71,7 +71,7 @@ public async Task CheckContainerRegistryNameAvailability_RegistryCheckNameNotAva [Ignore("Only validating compilation of examples")] public async Task GetContainerRegistries_RegistryList() { - // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2025-04-01/examples/RegistryList.json + // Generated from example definition: specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/stable/2025-11-01/examples/RegistryList.json // this example is just showing the usage of "Registries_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line