Skip to content

Commit fb26336

Browse files
Update ACR Docstrings (Azure#22576)
* update docstrings * more updates * regen from updated swagger * update generated API listing * Update sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs Co-authored-by: Christopher Scott <[email protected]> * Update sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Repository/ContainerRepository.cs Co-authored-by: Christopher Scott <[email protected]> * pr fb * update to latest swagger in azure-rest-api-specs repo * export API Co-authored-by: Christopher Scott <[email protected]>
1 parent 532f950 commit fb26336

18 files changed

+111
-89
lines changed

sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Artifact/RegistryArtifact.cs

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99

1010
namespace Azure.Containers.ContainerRegistry
1111
{
12-
/// <summary> A helper class that groups information and operations about an image or artifact in this container registry. </summary>
12+
/// <summary> `Artifact` is the general term for items stored in a container registry,
13+
/// and can include Docker images or other Open Container Initiative (OCI) artifact types.
14+
/// <para>
15+
/// The <see cref="RegistryArtifact"/> class is a helper class that groups information and operations about an image or artifact in this container registry.
16+
/// </para>
17+
/// </summary>
1318
public partial class RegistryArtifact
1419
{
1520
private readonly ClientDiagnostics _clientDiagnostics;
@@ -57,7 +62,7 @@ protected RegistryArtifact()
5762

5863
#region Registry Artifact/Manifest methods
5964

60-
/// <summary> Get registry artifact properties by tag or digest. </summary>
65+
/// <summary> Get the properties of the manifest that uniquely identifies this artifact. </summary>
6166
/// <param name="cancellationToken"> The cancellation token to use. </param>
6267
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
6368
public virtual async Task<Response<ArtifactManifestProperties>> GetManifestPropertiesAsync(CancellationToken cancellationToken = default)
@@ -77,7 +82,7 @@ public virtual async Task<Response<ArtifactManifestProperties>> GetManifestPrope
7782
}
7883
}
7984

80-
/// <summary> Get registry artifact properties by tag or digest. </summary>
85+
/// <summary> Get the properties of the manifest that uniquely identifies this artifact. </summary>
8186
/// <param name="cancellationToken"> The cancellation token to use. </param>
8287
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
8388
public virtual Response<ArtifactManifestProperties> GetManifestProperties(CancellationToken cancellationToken = default)
@@ -118,8 +123,8 @@ private static bool IsDigest(string tagOrDigest)
118123
return tagOrDigest.Contains(":");
119124
}
120125

121-
/// <summary> Update manifest attributes. </summary>
122-
/// <param name="value"> Manifest properties value. </param>
126+
/// <summary> Update the properties of the artifact's manifest. </summary>
127+
/// <param name="value"> Manifest properties object containing values to update. </param>
123128
/// <param name="cancellationToken"> The cancellation token to use. </param>
124129
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="value"/> is null. </exception>
125130
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
@@ -141,8 +146,8 @@ public virtual async Task<Response<ArtifactManifestProperties>> UpdateManifestPr
141146
}
142147
}
143148

144-
/// <summary> Update manifest attributes. </summary>
145-
/// <param name="value"> Manifest properties value. </param>
149+
/// <summary> Update the properties of the artifact's manifest. </summary>
150+
/// <param name="value"> Manifest properties object containing values to update. </param>
146151
/// <param name="cancellationToken"> The cancellation token to use. </param>
147152
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="value"/> is null. </exception>
148153
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
@@ -177,7 +182,7 @@ private static ManifestWriteableProperties GetManifestWriteableProperties(Artifa
177182
};
178183
}
179184

180-
/// <summary> Delete registry artifact. </summary>
185+
/// <summary> Delete registry artifact by deleting its manifest. </summary>
181186
/// <param name="cancellationToken"> The cancellation token to use. </param>
182187
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
183188
public virtual async Task<Response> DeleteAsync(CancellationToken cancellationToken = default)
@@ -196,7 +201,7 @@ public virtual async Task<Response> DeleteAsync(CancellationToken cancellationTo
196201
}
197202
}
198203

199-
/// <summary> Delete registry artifact. </summary>
204+
/// <summary> Delete registry artifact by deleting its manifest. </summary>
200205
/// <param name="cancellationToken"> The cancellation token to use. </param>
201206
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
202207
public virtual Response Delete(CancellationToken cancellationToken = default)
@@ -218,7 +223,7 @@ public virtual Response Delete(CancellationToken cancellationToken = default)
218223
#endregion
219224

220225
#region Tag methods
221-
/// <summary> Get the collection of tags for a repository. </summary>
226+
/// <summary> List the tags that uniquely identify this artifact and the properties of each. </summary>
222227
/// <param name="orderBy"> Requested order of tags in the collection. </param>
223228
/// <param name="cancellationToken"> The cancellation token to use. </param>
224229
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
@@ -264,7 +269,7 @@ async Task<Page<ArtifactTagProperties>> NextPageFunc(string nextLink, int? pageS
264269
return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
265270
}
266271

267-
/// <summary> Get the collection of tags for a repository, including their full metadata. </summary>
272+
/// <summary> List the tags that uniquely identify this artifact and the properties of each. </summary>
268273
/// <param name="orderBy"> Requested order of tags in the collection. </param>
269274
/// <param name="cancellationToken"> The cancellation token to use. </param>
270275
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
@@ -310,7 +315,7 @@ Page<ArtifactTagProperties> NextPageFunc(string nextLink, int? pageSizeHint)
310315
return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
311316
}
312317

313-
/// <summary> Get tag properties by tag. </summary>
318+
/// <summary> Get the properties of the specified tag. </summary>
314319
/// <param name="tag"> Tag name. </param>
315320
/// <param name="cancellationToken"> The cancellation token to use. </param>
316321
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="tag"/> is null. </exception>
@@ -331,7 +336,7 @@ public virtual async Task<Response<ArtifactTagProperties>> GetTagPropertiesAsync
331336
}
332337
}
333338

334-
/// <summary> Get tag attributes by tag. </summary>
339+
/// <summary> Get the properties of the specified tag. </summary>
335340
/// <param name="tag"> Tag name. </param>
336341
/// <param name="cancellationToken"> The cancellation token to use. </param>
337342
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="tag"/> is null. </exception>
@@ -354,9 +359,9 @@ public virtual Response<ArtifactTagProperties> GetTagProperties(string tag, Canc
354359
}
355360
}
356361

357-
/// <summary> Update tag attributes. </summary>
358-
/// <param name="tag"> Tag name. </param>
359-
/// <param name="value"> Tag property value. </param>
362+
/// <summary> Update the properties of a given tag. </summary>
363+
/// <param name="tag"> Name of the tag to update properties on. </param>
364+
/// <param name="value"> Tag properties object containing values to update. </param>
360365
/// <param name="cancellationToken"> The cancellation token to use. </param>
361366
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="tag"/> is null. </exception>
362367
/// <exception cref="ArgumentException"> Thrown when <paramref name="tag"/> is empty. </exception>
@@ -391,9 +396,9 @@ private static TagWriteableProperties GetTagWriteableProperties(ArtifactTagPrope
391396
};
392397
}
393398

394-
/// <summary> Update tag attributes. </summary>
395-
/// <param name="tag"> Tag name. </param>
396-
/// <param name="value"> Tag property value. </param>
399+
/// <summary> Update the properties of a given tag. </summary>
400+
/// <param name="tag"> Name of the tag to update properties on. </param>
401+
/// <param name="value"> Tag properties object containing values to update. </param>
397402
/// <param name="cancellationToken"> The cancellation token to use. </param>
398403
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="tag"/> is null. </exception>
399404
/// <exception cref="ArgumentException"> Thrown when <paramref name="tag"/> is empty. </exception>
@@ -418,7 +423,7 @@ public virtual Response<ArtifactTagProperties> UpdateTagProperties(string tag, A
418423
}
419424

420425
/// <summary> Delete the tag. This removes the tag from the artifact and its manifest. </summary>
421-
/// <param name="tag"> Name of tag to delete. </param>
426+
/// <param name="tag"> The name of tag to delete. </param>
422427
/// <param name="cancellationToken"> The cancellation token to use. </param>
423428
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="tag"/> is null. </exception>
424429
/// <exception cref="ArgumentException"> Thrown when <paramref name="tag"/> is empty. </exception>
@@ -441,7 +446,7 @@ public virtual async Task<Response> DeleteTagAsync(string tag, CancellationToken
441446
}
442447

443448
/// <summary> Delete the tag. This removes the tag from the artifact and its manifest. </summary>
444-
/// <param name="tag"> Name of tag to delete. </param>
449+
/// <param name="tag"> The name of tag to delete. </param>
445450
/// <param name="cancellationToken"> The cancellation token to use. </param>
446451
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="tag"/> is null. </exception>
447452
/// <exception cref="ArgumentException"> Thrown when <paramref name="tag"/> is empty. </exception>

sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public partial class ContainerRegistryClient
2323
/// <summary>
2424
/// Initializes a new instance of the <see cref="ContainerRegistryClient"/> for managing container images and artifacts,
2525
/// using anonymous access to the registry. Only operations that support anonymous access are enabled. Other service
26-
/// methods will throw <see cref="RequestFailedException"/> if called.
26+
/// methods will throw <see cref="RequestFailedException"/> if called from this client.
2727
/// </summary>
2828
/// <param name="endpoint">The URI endpoint of the container registry. This is likely to be similar
2929
/// to "https://{registry-name}.azurecr.io".</param>
@@ -33,9 +33,9 @@ public partial class ContainerRegistryClient
3333
}
3434

3535
/// <summary>
36-
/// Initializes a new instance of the ContainerRegistryClient for managing container images and artifacts,
36+
/// Initializes a new instance of the <see cref="ContainerRegistryClient"/> for managing container images and artifacts,
3737
/// using anonymous access to the registry. Only operations that support anonymous access are enabled. Other service
38-
/// methods will throw <see cref="RequestFailedException"/> if called.
38+
/// methods will throw <see cref="RequestFailedException"/> if called from this client.
3939
/// </summary>
4040
/// <param name="endpoint">The URI endpoint of the container registry. This is likely to be similar
4141
/// to "https://{registry-name}.azurecr.io".</param>
@@ -58,7 +58,7 @@ public partial class ContainerRegistryClient
5858
}
5959

6060
/// <summary>
61-
/// Initializes a new instance of the ContainerRegistryClient for managing container images and artifacts.
61+
/// Initializes a new instance of the <see cref="ContainerRegistryClient"/> for managing container images and artifacts.
6262
/// </summary>
6363
/// <param name="endpoint">The URI endpoint of the container registry. This is likely to be similar
6464
/// to "https://{registry-name}.azurecr.io".</param>
@@ -93,7 +93,7 @@ protected ContainerRegistryClient()
9393
/// </summary>
9494
public virtual Uri Endpoint => _endpoint;
9595

96-
/// <summary> List repositories in this registry. </summary>
96+
/// <summary> List the names of the repositories in this registry. </summary>
9797
/// <param name="cancellationToken"> The cancellation token to use. </param>
9898
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
9999
public virtual AsyncPageable<string> GetRepositoryNamesAsync(CancellationToken cancellationToken = default)
@@ -134,7 +134,7 @@ async Task<Page<string>> NextPageFunc(string continuationToken, int? pageSizeHin
134134
return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
135135
}
136136

137-
/// <summary> List repositories in this registry. </summary>
137+
/// <summary> List the names of the repositories in this registry. </summary>
138138
/// <param name="cancellationToken"> The cancellation token to use. </param>
139139
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
140140
public virtual Pageable<string> GetRepositoryNames(CancellationToken cancellationToken = default)
@@ -189,7 +189,7 @@ internal static string ParseUriReferenceFromLinkHeader(string linkValue)
189189
return linkValue?.Substring(1, linkValue.IndexOf('>') - 1);
190190
}
191191

192-
/// <summary> Delete the repository identified by `repostitory`. </summary>
192+
/// <summary> Delete the repository identified by `repository` and all associated artifacts.</summary>
193193
/// <param name="repositoryName"> Repository name (including the namespace). </param>
194194
/// <param name="cancellationToken"> The cancellation token to use. </param>
195195
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="repositoryName"/> is null. </exception>
@@ -212,7 +212,7 @@ public virtual async Task<Response> DeleteRepositoryAsync(string repositoryName,
212212
}
213213
}
214214

215-
/// <summary> Delete the repository identified by `repostitory`. </summary>
215+
/// <summary> Delete the repository identified by `repository` and all associated artifacts.</summary>
216216
/// <param name="repositoryName"> Repository name (including the namespace). </param>
217217
/// <param name="cancellationToken"> The cancellation token to use. </param>
218218
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="repositoryName"/> is null. </exception>
@@ -236,7 +236,7 @@ public virtual Response DeleteRepository(string repositoryName, CancellationToke
236236
}
237237

238238
/// <summary>
239-
/// Create a new <see cref="ContainerRepository"/> object for the specified repository.
239+
/// Create a new <see cref="ContainerRepository"/> object for calling service methods related to the repository specified by `repositoryName`.
240240
/// </summary>
241241
/// <param name="repositoryName"> The name of the repository to reference. </param>
242242
/// <returns> A new <see cref="ContainerRepository"/> for the desired repository. </returns>
@@ -254,7 +254,7 @@ public virtual ContainerRepository GetRepository(string repositoryName)
254254
}
255255

256256
/// <summary>
257-
/// Create a new <see cref="RegistryArtifact"/> object for the specified artifact.
257+
/// Create a new <see cref="RegistryArtifact"/> object for calling service methods related to the artifact specified by `repositoryName` and `tagOrDigest`.
258258
/// </summary>
259259
/// <param name="repositoryName"> The name of the repository to reference. </param>
260260
/// <param name="tagOrDigest"> Either a tag or a digest that uniquely identifies the artifact. </param>

sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClientOptions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Azure.Containers.ContainerRegistry
88
{
99
/// <summary>
10-
/// The options for <see cref="ContainerRegistryClient"/>
10+
/// Options that allow users to configure the requests sent to the Container Registry service.
1111
/// </summary>
1212
public class ContainerRegistryClientOptions : ClientOptions
1313
{
@@ -25,6 +25,7 @@ public class ContainerRegistryClientOptions : ClientOptions
2525
public string AuthenticationScope { get; set; } = "https://management.azure.com/.default";
2626

2727
/// <summary>
28+
/// Create an instance of the options for configuring request sent to the Container Registry service.
2829
/// </summary>
2930
/// <param name="version"></param>
3031
public ContainerRegistryClientOptions(ServiceVersion version = ServiceVersion.V1_0)
@@ -49,6 +50,7 @@ private void AddHeadersAndQueryParameters()
4950
}
5051

5152
/// <summary>
53+
/// The versions of the Container Registry service supported by this client library.
5254
/// </summary>
5355
public enum ServiceVersion
5456
{

sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/ContainerRegistryModelFactory.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)