Skip to content

Commit

Permalink
Hide deprecated German cloud option in ACR Audience extensible enum (#…
Browse files Browse the repository at this point in the history
…33424)

* remove support for deprecated German cloud.

* export API
  • Loading branch information
annelo-msft authored Feb 13, 2023
1 parent cb3f935 commit 91b4b1a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public ArtifactTagProperties() { }
private readonly int _dummyPrimitive;
public ContainerRegistryAudience(string value) { throw null; }
public static Azure.Containers.ContainerRegistry.ContainerRegistryAudience AzureResourceManagerChina { get { throw null; } }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static Azure.Containers.ContainerRegistry.ContainerRegistryAudience AzureResourceManagerGermany { get { throw null; } }
public static Azure.Containers.ContainerRegistry.ContainerRegistryAudience AzureResourceManagerGovernment { get { throw null; } }
public static Azure.Containers.ContainerRegistry.ContainerRegistryAudience AzureResourceManagerPublicCloud { get { throw null; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public ContainerRegistryAudience(string value)
public static ContainerRegistryAudience AzureResourceManagerChina { get; } = new ContainerRegistryAudience(AzureResourceManagerChinaValue);

/// <summary> Azure Germany. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static ContainerRegistryAudience AzureResourceManagerGermany { get; } = new ContainerRegistryAudience(AzureResourceManagerGermanyValue);

/// <summary> Azure Government. </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@ public static Uri GetAuthorityHost(string endpoint)
return AzureAuthorityHosts.AzureGovernment;
}

if (endpoint.Contains(".azurecr.de"))
{
return AzureAuthorityHosts.AzureGermany;
}

throw new NotSupportedException($"Cloud for endpoint {endpoint} is not supported.");
}

Expand Down Expand Up @@ -213,11 +208,6 @@ private ContainerRegistryAudience GetAudience(Uri authorityHost)
return ContainerRegistryAudience.AzureResourceManagerGovernment;
}

if (authorityHost == AzureAuthorityHosts.AzureGermany)
{
return ContainerRegistryAudience.AzureResourceManagerGermany;
}

throw new NotSupportedException($"Cloud for authority host {authorityHost} is not supported.");
}

Expand Down

0 comments on commit 91b4b1a

Please sign in to comment.