Пример #1
0
 /// <summary>
 /// List respositories
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='last'>
 /// query parameter for the last item in previou query
 /// </param>
 /// <param name='n'>
 /// query parameter for max number of items
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Repositories> GetRepositoriesAsync(this IAzureContainerRegistryClient operations, string last = default(string), string n = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetRepositoriesWithHttpMessagesAsync(last, n, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Same as GET, except only the headers are returned.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='digest'>
 /// Digest of a BLOB
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CheckBlobExistenceHeaders> CheckBlobExistenceAsync(this IAzureContainerRegistryClient operations, string name, string digest, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckBlobExistenceWithHttpMessagesAsync(name, digest, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
        /// <summary>
        /// Retrieve the blob from the registry identified by `digest`. This endpoint
        /// may also support RFC7233 compliant range requests. Support can be detected
        /// by issuing a HEAD request. If the header `Accept-Range: bytes` is returned,
        /// range requests can be used to fetch partial content.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name='name'>
        /// Name of the image (including the namespace)
        /// </param>
        /// <param name='digest'>
        /// Digest of a BLOB
        /// </param>
        /// <param name='range'>
        /// Format : bytes=&lt;start&gt;-&lt;end&gt;,  HTTP Range header specifying
        /// blob chunk.
        /// </param>
        /// <param name='part'>
        /// Acquire only part of a blob. This endpoint may also support RFC7233
        /// compliant range requests. Support can be detected by issuing a HEAD
        /// request. If the header `Accept-Range: bytes` is returned, range requests
        /// can be used to fetch partial content
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        public static async Task <Stream> GetBlobPartAsync(this IAzureContainerRegistryClient operations, string name, string digest, string range, string part = default(string), CancellationToken cancellationToken = default(CancellationToken))
        {
            var _result = await operations.GetBlobPartWithHttpMessagesAsync(name, digest, range, part, null, cancellationToken).ConfigureAwait(false);

            _result.Request.Dispose();
            return(_result.Body);
        }
Пример #4
0
 /// <summary>
 /// List manifests of a repository
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='last'>
 /// query parameter for the last item in previou query
 /// </param>
 /// <param name='n'>
 /// query parameter for max number of items
 /// </param>
 /// <param name='orderby'>
 /// orderby query parameter
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AcrManifests> GetAcrManifestsAsync(this IAzureContainerRegistryClient operations, string name, string last = default(string), string n = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAcrManifestsWithHttpMessagesAsync(name, last, n, orderby, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #5
0
 /// <summary>
 /// Delete a respository
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DeletedRepository> DeleteAcrRepositoryAsync(this IAzureContainerRegistryClient operations, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteAcrRepositoryWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Mount a blob identified by the `mount` parameter from another repository.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='fromParameter'>
 /// Name of the source repository.
 /// </param>
 /// <param name='mount'>
 /// Digest of blob to mount from the source repository.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <StartBlobUploadHeaders> StartBlobUploadAsync(this IAzureContainerRegistryClient operations, string name, string fromParameter, string mount, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.StartBlobUploadWithHttpMessagesAsync(name, fromParameter, mount, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Exchange AAD tokens for an ACR refresh Token
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='grantType'>
 /// Can take a value of access_token_refresh_token, or access_token, or
 /// refresh_token. Possible values include: 'access_token_refresh_token',
 /// 'access_token', 'refresh_token'
 /// </param>
 /// <param name='service'>
 /// Indicates the name of your Azure container registry.
 /// </param>
 /// <param name='tenant'>
 /// AAD tenant associated to the AAD credentials.
 /// </param>
 /// <param name='refreshToken'>
 /// AAD refresh token, mandatory when grant_type is access_token_refresh_token
 /// or refresh_token
 /// </param>
 /// <param name='accessToken'>
 /// AAD access token, mandatory when grant_type is access_token_refresh_token
 /// or access_token.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RefreshToken> GetRefreshTokenFromExchangeAsync(this IAzureContainerRegistryClient operations, string grantType, string service, string tenant = default(string), string refreshToken = default(string), string accessToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetRefreshTokenFromExchangeWithHttpMessagesAsync(grantType, service, tenant, refreshToken, accessToken, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Exchange Username, Password and Scope an ACR Access Token
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='service'>
 /// Indicates the name of your Azure container registry.
 /// </param>
 /// <param name='scope'>
 /// Expected to be a valid scope, and can be specified more than once for
 /// multiple scope requests. You can obtain this from the Www-Authenticate
 /// response header from the challenge.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <AccessToken> GetAccessTokenFromLoginAsync(this IAzureContainerRegistryClient operations, string service, string scope, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAccessTokenFromLoginWithHttpMessagesAsync(service, scope, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Tells whether this Docker Registry instance supports Docker Registry HTTP
 /// API v2
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> CheckV2SupportAsync(this IAzureContainerRegistryClient operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckV2SupportWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #10
0
 /// <summary>
 /// Pulls the image manifest file associated with the specified name and
 /// reference. Reference may be a tag or a digest
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='reference'>
 /// A tag or a digest, pointing to a specific image
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Manifest> GetManifestAsync(this IAzureContainerRegistryClient operations, string name, string reference, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetManifestWithHttpMessagesAsync(name, reference, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #11
0
 /// <summary>
 /// Update attributes of a manifest
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='reference'>
 /// A tag or a digest, pointing to a specific image
 /// </param>
 /// <param name='value'>
 /// Changeable attribute value
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateAcrManifestAttributesAsync(this IAzureContainerRegistryClient operations, string name, string reference, ChangeableAttributes value = default(ChangeableAttributes), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateAcrManifestAttributesWithHttpMessagesAsync(name, reference, value, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #12
0
 /// <summary>
 /// Tells whether this Docker Registry instance supports Docker Registry HTTP
 /// API v2
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task GetDockerRegistryV2SupportAsync(this IAzureContainerRegistryClient operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.GetDockerRegistryV2SupportWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #13
0
 /// <summary>
 /// Delete tag
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='reference'>
 /// A tag name of the image
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAcrTagAsync(this IAzureContainerRegistryClient operations, string name, string reference, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteAcrTagWithHttpMessagesAsync(name, reference, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Cancel outstanding upload processes, releasing associated resources. If
 /// this is not called, the unfinished uploads will eventually timeout.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='uuid'>
 /// A uuid identifying the upload.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task CancelBlobUploadAsync(this IAzureContainerRegistryClient operations, string name, string uuid, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.CancelBlobUploadWithHttpMessagesAsync(name, uuid, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Retrieve status of upload identified by uuid. The primary purpose of this
 /// endpoint is to resolve the current status of a resumable upload.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='location'>
 /// Link acquired from upload start or previous chunk. Note, do not include
 /// initial / (must do substring(1) )
 /// </param>
 /// <param name='_state'>
 /// Acquired from NextLink
 /// </param>
 /// <param name='_nouploadcache'>
 /// Acquired from NextLink
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <GetBlobUploadStatusFromNextHeaders> GetBlobUploadStatusFromNextAsync(this IAzureContainerRegistryClient operations, string location, string _state = default(string), bool?_nouploadcache = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetBlobUploadStatusFromNextWithHttpMessagesAsync(location, _state, _nouploadcache, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Complete the upload, providing all the data in the body, if necessary. A
 /// request without a body will just complete the upload with previously
 /// uploaded content.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='digest'>
 /// Digest of a BLOB
 /// </param>
 /// <param name='location'>
 /// Link acquired from upload start or previous chunk. Note, do not include
 /// initial / (must do substring(1) )
 /// </param>
 /// <param name='value'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <EndBlobUploadFromNextHeaders> EndBlobUploadFromNextAsync(this IAzureContainerRegistryClient operations, string digest, string location, Stream value = default(Stream), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.EndBlobUploadFromNextWithHttpMessagesAsync(digest, location, value, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Upload a chunk of data to specified upload without completing the upload.
 /// The data will be uploaded to the specified Content Range.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='value'>
 /// </param>
 /// <param name='contentRange'>
 /// Range of bytes identifying the desired block of content represented by the
 /// body. Start must the end offset retrieved via status check plus one. Note
 /// that this is a non-standard use of the `Content-Range` header.
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='uuid'>
 /// A uuid identifying the upload.
 /// </param>
 /// <param name='chunk'>
 /// Initiate Chunk Blob Upload
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <UploadBlobContentChunkHeaders> UploadBlobContentChunkAsync(this IAzureContainerRegistryClient operations, Stream value, string contentRange, string name, string uuid, string chunk = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UploadBlobContentChunkWithHttpMessagesAsync(value, contentRange, name, uuid, chunk, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Initiate a resumable blob upload with an empty request body.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='resumable'>
 /// Initiate Resumable Blob Upload
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <StartEmptyResumableBlobUploadHeaders> StartEmptyResumableBlobUploadAsync(this IAzureContainerRegistryClient operations, string name, string resumable = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.StartEmptyResumableBlobUploadWithHttpMessagesAsync(name, resumable, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Complete the upload, providing all the data in the body, if necessary. A
 /// request without a body will just complete the upload with previously
 /// uploaded content.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='digest'>
 /// Digest of a BLOB
 /// </param>
 /// <param name='name'>
 /// Name of the image (including the namespace)
 /// </param>
 /// <param name='uuid'>
 /// A uuid identifying the upload.
 /// </param>
 /// <param name='_state'>
 /// Acquired from NextLink
 /// </param>
 /// <param name='_nouploadcache'>
 /// Acquired from NextLink
 /// </param>
 /// <param name='value'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <EndBlobUploadSpecifiedHeaders> EndBlobUploadSpecifiedAsync(this IAzureContainerRegistryClient operations, string digest, string name, string uuid, string _state = default(string), bool?_nouploadcache = default(bool?), Stream value = default(Stream), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.EndBlobUploadSpecifiedWithHttpMessagesAsync(digest, name, uuid, _state, _nouploadcache, value, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }