Beispiel #1
0
        IEnumerable <ListPartsResponse> IPaginator <ListPartsResponse> .Paginate()
        {
            if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
            {
                throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
            }
            var marker = _request.Marker;
            ListPartsResponse response;

            do
            {
                _request.Marker = marker;
                response        = _client.ListParts(_request);
                marker          = response.Marker;
                yield return(response);
            }while (marker != null);
        }
        public void GlacierListParts()
        {
            #region to-list-the-parts-of-an-archive-that-have-been-uploaded-in-a-multipart-upload-1481921767590

            var response = client.ListParts(new ListPartsRequest
            {
                AccountId = "-",
                UploadId  = "OW2fM5iVylEpFEMM9_HpKowRapC3vn5sSL39_396UW9zLFUWVrnRHaPjUJddQ5OxSHVXjYtrN47NBZ-khxOjyEXAMPLE",
                VaultName = "examplevault"
            });

            string archiveDescription    = response.ArchiveDescription;
            string creationDate          = response.CreationDate;
            string marker                = response.Marker;
            string multipartUploadId     = response.MultipartUploadId;
            long   partSizeInBytes       = response.PartSizeInBytes;
            List <PartListElement> parts = response.Parts;
            string vaultARN              = response.VaultARN;

            #endregion
        }