Codeunit 9053 ABS Blob Client
src/System Application/App/Azure Blob Services API/src/ABSBlobClient.Codeunit.al1,169 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------// Copyright (c) Microsoft Corporation. All rights reserved.// Licensed under the MIT License. See License.txt in the project root for license information.// ------------------------------------------------------------------------------------------------namespace System.Azure.Storage;/// <summary>/// Provides functionality for using operations on blobs in Azure Blob storage./// </summary>codeunit 9053 "ABS Blob Client"{ Access = Public; InherentEntitlements = X; InherentPermissions = X; /// <summary> /// Initializes the Azure Blob storage client. /// </summary> /// <param name="StorageAccount">The name of Storage Account to use.</param> /// <param name="Container">The name of the container to use.</param> /// <param name="Authorization">The authorization to use.</param> procedure Initialize(StorageAccount: Text; Container: Text; Authorization: Interface "Storage Service Authorization") var StorageServiceAuthorization: Codeunit "Storage Service Authorization"; begin ABSClientImpl.Initialize(StorageAccount, Container, '', Authorization, StorageServiceAuthorization.GetDefaultAPIVersion()); end; /// <summary> /// Initializes the Azure BLOB Storage BLOB client. /// </summary> /// <param name="StorageAccount">The name of Storage Account to use.</param> /// <param name="Container">The name of the container to use.</param> /// <param name="Authorization">The authorization to use.</param> /// <param name="APIVersion">The used API version to use.</param> procedure Initialize(StorageAccount: Text; Container: Text; Authorization: Interface "Storage Service Authorization"; APIVersion: Enum "Storage Service API Version") begin ABSClientImpl.Initialize(StorageAccount, Container, '', Authorization, APIVersion); end; /// <summary> /// The base URL to use when constructing the final URI. /// If not set, the base URL is https://%1.blob.core.windows.net where %1 is the storage account name. /// </summary> /// <remarks>Use %1 as a placeholder for the storage account name.</remarks> /// <param name="BaseUrl">A valid URL string</param> procedure SetBaseUrl(BaseUrl: Text) begin ABSClientImpl.SetBaseUrl(BaseUrl); end; /// <summary> /// Lists the blobs in a specific container. /// see: https://go.microsoft.com/fwlink/?linkid=2210588 /// </summary> /// <param name="ABSContainerContent">Collection of the result (temporary record).</param> /// <returns>An operation response object</returns> procedure ListBlobs(var ABSContainerContent: Record "ABS Container Content"): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.ListBlobs(ABSContainerContent, ABSOptionalParameters)); end; /// <summary> /// Lists the blobs in a specific container. /// see: https://go.microsoft.com/fwlink/?linkid=2210588 /// </summary> /// <param name="ABSContainerContent">Collection of the result (temporary record).</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure ListBlobs(var ABSContainerContent: Record "ABS Container Content"; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.ListBlobs(ABSContainerContent, ABSOptionalParameters)); end; /// <summary> /// Lists the blobs in a specific container. /// see: https://go.microsoft.com/fwlink/?linkid=2210588 /// </summary> /// <param name="BlobList">Collection of the result (BlobList of [Text, XmlNode]). /// The key in the dictionary is the full blob path and the value is the complete blob xmlnode from the response</param> /// <returns>An operation response object</returns> procedure ListBlobs(var BlobList: Dictionary of [Text, XmlNode]): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.ListBlobs(BlobList, ABSOptionalParameters)); end; /// <summary> /// Lists the blobs in a specific container. /// see: https://go.microsoft.com/fwlink/?linkid=2210588 /// </summary> /// <param name="BlobList">Collection of the result (BlobList of [Text, XmlNode]). /// The key in the dictionary is the full blob path and the value is the complete blob xmlnode from the response</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure ListBlobs(var BlobList: Dictionary of [Text, XmlNode]; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.ListBlobs(BlobList, ABSOptionalParameters)); end; /// <summary> /// Uploads a file as a BlockBlob (with File Selection Dialog). /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <returns>An operation response object</returns> procedure PutBlobBlockBlobUI(): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.PutBlobBlockBlobUI(ABSOptionalParameters)); end; /// <summary> /// Uploads a file as a BlockBlob (with File Selection Dialog). /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure PutBlobBlockBlobUI(ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlobBlockBlobUI(ABSOptionalParameters)); end; /// <summary> /// Uploads the content of an InStream as a BlockBlob /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceInStream">The Content of the Blob as InStream.</param> /// <returns>An operation response object</returns> procedure PutBlobBlockBlobStream(BlobName: Text; var SourceInStream: InStream): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.PutBlobBlockBlobStream(BlobName, SourceInStream, '', ABSOptionalParameters)); end; /// <summary> /// Uploads the content of an InStream as a BlockBlob /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceInStream">The Content of the Blob as InStream.</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <returns>An operation response object</returns> procedure PutBlobBlockBlobStream(BlobName: Text; var SourceInStream: InStream; ContentType: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.PutBlobBlockBlobStream(BlobName, SourceInStream, ContentType, ABSOptionalParameters)); end; /// <summary> /// Uploads the content of an InStream as a BlockBlob. /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceInStream">The Content of the Blob as InStream.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure PutBlobBlockBlobStream(BlobName: Text; var SourceInStream: InStream; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlobBlockBlobStream(BlobName, SourceInStream, '', ABSOptionalParameters)); end; /// <summary> /// Uploads the content of an InStream as a BlockBlob. /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceInStream">The Content of the Blob as InStream.</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure PutBlobBlockBlobStream(BlobName: Text; var SourceInStream: InStream; ContentType: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlobBlockBlobStream(BlobName, SourceInStream, ContentType, ABSOptionalParameters)); end; /// <summary> /// Uploads text as a BlockBlob. /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceText">The Content of the Blob as Text.</param> /// <returns>An operation response object</returns> procedure PutBlobBlockBlobText(BlobName: Text; SourceText: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.PutBlobBlockBlobText(BlobName, SourceText, '', ABSOptionalParameters)); end; /// <summary> /// Uploads text as a BlockBlob. /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceText">The Content of the Blob as Text.</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <returns>An operation response object</returns> procedure PutBlobBlockBlobText(BlobName: Text; SourceText: Text; ContentType: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.PutBlobBlockBlobText(BlobName, SourceText, ContentType, ABSOptionalParameters)); end; /// <summary> /// Uploads text as a BlockBlob. /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceText">The Content of the Blob as Text.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure PutBlobBlockBlobText(BlobName: Text; SourceText: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlobBlockBlobText(BlobName, SourceText, '', ABSOptionalParameters)); end; /// <summary> /// Uploads text as a BlockBlob. /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceText">The Content of the Blob as Text.</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure PutBlobBlockBlobText(BlobName: Text; SourceText: Text; ContentType: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlobBlockBlobText(BlobName, SourceText, ContentType, ABSOptionalParameters)); end; /// <summary> /// Creates a PageBlob. /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <returns>An operation response object</returns> procedure PutBlobPageBlob(BlobName: Text; ContentType: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.PutBlobPageBlob(BlobName, ContentType, ABSOptionalParameters)); end; /// <summary> /// Creates a PageBlob. /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure PutBlobPageBlob(BlobName: Text; ContentType: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlobPageBlob(BlobName, ContentType, ABSOptionalParameters)); end; /// <summary> /// The Put Blob operation creates a new append blob /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// Uses 'application/octet-stream' as Content-Type /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <returns>An operation response object</returns> procedure PutBlobAppendBlobStream(BlobName: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(PutBlobAppendBlob(BlobName, 'application/octet-stream', ABSOptionalParameters)); end; /// <summary> /// The Put Blob operation creates a new append blob /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// Uses 'application/octet-stream' as Content-Type /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure PutBlobAppendBlobStream(BlobName: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(PutBlobAppendBlob(BlobName, 'application/octet-stream', ABSOptionalParameters)); end; /// <summary> /// The Put Blob operation creates a new append blob /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// Uses 'text/plain; charset=UTF-8' as Content-Type /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure PutBlobAppendBlobText(BlobName: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(PutBlobAppendBlob(BlobName, 'text/plain; charset=UTF-8', ABSOptionalParameters)); end; /// <summary> /// The Put Blob operation creates a new append blob /// see: https://go.microsoft.com/fwlink/?linkid=2210387 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure PutBlobAppendBlob(BlobName: Text; ContentType: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlobAppendBlob(BlobName, ContentType, ABSOptionalParameters)); end; /// <summary> /// The Append Block operation commits a new block of data to the end of an existing append blob. /// see: https://go.microsoft.com/fwlink/?linkid=2211404 /// Uses 'text/plain; charset=UTF-8' as Content-Type /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ContentAsText">Text-variable containing the content that should be added to the Blob</param> /// <returns>An operation response object</returns> procedure AppendBlockText(BlobName: Text; ContentAsText: Text): Codeunit "ABS Operation Response" begin exit(AppendBlockText(BlobName, ContentAsText, 'text/plain; charset=UTF-8')); end; /// <summary> /// The Append Block operation commits a new block of data to the end of an existing append blob. /// see: https://go.microsoft.com/fwlink/?linkid=2211404 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ContentAsText">Text-variable containing the content that should be added to the Blob</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <returns>An operation response object</returns> procedure AppendBlockText(BlobName: Text; ContentAsText: Text; ContentType: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(AppendBlock(BlobName, ContentType, ContentAsText, ABSOptionalParameters)); end; /// <summary> /// The Append Block operation commits a new block of data to the end of an existing append blob. /// see: https://go.microsoft.com/fwlink/?linkid=2211404 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ContentAsText">Text-variable containing the content that should be added to the Blob</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure AppendBlockText(BlobName: Text; ContentAsText: Text; ContentType: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(AppendBlock(BlobName, ContentType, ContentAsText, ABSOptionalParameters)); end; /// <summary> /// The Append Block operation commits a new block of data to the end of an existing append blob. /// see: https://go.microsoft.com/fwlink/?linkid=2211404 /// Uses 'application/octet-stream' as Content-Type /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ContentAsInStream">InStream containing the content that should be added to the Blob</param> /// <returns>An operation response object</returns> procedure AppendBlockStream(BlobName: Text; ContentAsInStream: InStream): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(AppendBlockStream(BlobName, ContentAsInStream, 'application/octet-stream', ABSOptionalParameters)); end; /// <summary> /// The Append Block operation commits a new block of data to the end of an existing append blob. /// see: https://go.microsoft.com/fwlink/?linkid=2211404 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ContentAsInStream">InStream containing the content that should be added to the Blob</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <returns>An operation response object</returns> procedure AppendBlockStream(BlobName: Text; ContentAsInStream: InStream; ContentType: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(AppendBlock(BlobName, ContentType, ContentAsInStream, ABSOptionalParameters)); end; /// <summary> /// The Append Block operation commits a new block of data to the end of an existing append blob. /// see: https://go.microsoft.com/fwlink/?linkid=2211404 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ContentType">Value for Content-Type HttpHeader (e.g. 'text/plain; charset=UTF-8')</param> /// <param name="SourceContentVariant">Variant containing the content that should be added to the Blob</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure AppendBlock(BlobName: Text; ContentType: Text; SourceContentVariant: Variant; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.AppendBlock(BlobName, ContentType, SourceContentVariant, ABSOptionalParameters)); end; /// <summary> /// The Append Block From URL operation commits a new block of data to the end of an existing append blob. /// see: https://go.microsoft.com/fwlink/?linkid=2211405 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceUri">Specifies the name of the source blob.</param> /// <returns>An operation response object</returns> procedure AppendBlockFromURL(BlobName: Text; SourceUri: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.AppendBlockFromURL(BlobName, SourceUri, ABSOptionalParameters)); end; /// <summary> /// The Append Block From URL operation commits a new block of data to the end of an existing append blob. /// see: https://go.microsoft.com/fwlink/?linkid=2211405 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceUri">Specifies the name of the source blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure AppendBlockFromURL(BlobName: Text; SourceUri: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.AppendBlockFromURL(BlobName, SourceUri, ABSOptionalParameters)); end; /// <summary> /// Receives a Blob as a File from a Container. /// see: https://go.microsoft.com/fwlink/?linkid=2210388 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <returns>An operation response object</returns> procedure GetBlobAsFile(BlobName: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.GetBlobAsFile(BlobName, ABSOptionalParameters)); end; /// <summary> /// Receives a Blob as a File from a Container. /// see: https://go.microsoft.com/fwlink/?linkid=2210388 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure GetBlobAsFile(BlobName: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.GetBlobAsFile(BlobName, ABSOptionalParameters)); end; /// <summary> /// Receives a Blob as a InStream from a Container. /// see: https://go.microsoft.com/fwlink/?linkid=2210388 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="TargetInStream">The result InStream containg the content of the Blob.</param> /// <returns>An operation response object</returns> procedure GetBlobAsStream(BlobName: Text; var TargetInStream: InStream): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.GetBlobAsStream(BlobName, TargetInStream, ABSOptionalParameters)); end; /// <summary> /// Receives a Blob as a InStream from a Container. /// see: https://go.microsoft.com/fwlink/?linkid=2210388 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="TargetInStream">The result InStream containg the content of the Blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure GetBlobAsStream(BlobName: Text; var TargetInStream: InStream; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.GetBlobAsStream(BlobName, TargetInStream, ABSOptionalParameters)); end; /// <summary> /// Receives a Blob as Text from a Container. /// see: https://go.microsoft.com/fwlink/?linkid=2210388 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="TargetText">The result Text containg the content of the Blob.</param> /// <returns>An operation response object</returns> procedure GetBlobAsText(BlobName: Text; var TargetText: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.GetBlobAsText(BlobName, TargetText, ABSOptionalParameters)); end; /// <summary> /// Receives a Blob as Text from a Container. /// see: https://go.microsoft.com/fwlink/?linkid=2210388 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="TargetText">The result Text containg the content of the Blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure GetBlobAsText(BlobName: Text; var TargetText: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.GetBlobAsText(BlobName, TargetText, ABSOptionalParameters)); end; /// <summary> /// The Set Blob Expiry operation sets an expiry time on an existing blob. This operation is only allowed on Hierarchical Namespace enabled accounts /// Sets the expiry time relative to the file creation time, x-ms-expiry-time must be specified as the number of milliseconds to elapse from creation time. /// see: https://go.microsoft.com/fwlink/?linkid=2210389 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ExpiryTime">Number if miliseconds (Integer) until the expiration.</param> /// <returns>An operation response object</returns> procedure SetBlobExpiryRelativeToCreation(BlobName: Text; ExpiryTime: Integer): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.SetBlobExpiryRelativeToCreation(BlobName, ExpiryTime)); end; /// <summary> /// The Set Blob Expiry operation sets an expiry time on an existing blob. This operation is only allowed on Hierarchical Namespace enabled accounts /// Sets the expiry relative to the current time, x-ms-expiry-time must be specified as the number of milliseconds to elapse from now. /// see: https://go.microsoft.com/fwlink/?linkid=2210389 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ExpiryTime">Number if miliseconds (Integer) until the expiration.</param> /// <returns>An operation response object</returns> procedure SetBlobExpiryRelativeToNow(BlobName: Text; ExpiryTime: Integer): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.SetBlobExpiryRelativeToNow(BlobName, ExpiryTime)); end; /// <summary> /// The Set Blob Expiry operation sets an expiry time on an existing blob. This operation is only allowed on Hierarchical Namespace enabled accounts /// Sets the expiry to an absolute DateTime /// see: https://go.microsoft.com/fwlink/?linkid=2210389 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ExpiryTime">Absolute DateTime for the expiration.</param> /// <returns>An operation response object</returns> procedure SetBlobExpiryAbsolute(BlobName: Text; ExpiryTime: DateTime): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.SetBlobExpiryAbsolute(BlobName, ExpiryTime)); end; /// <summary> /// The Set Blob Expiry operation sets an expiry time on an existing blob. This operation is only allowed on Hierarchical Namespace enabled accounts /// Sets the file to never expire or removes the current expiry time, x-ms-expiry-time must not to be specified. /// see: https://go.microsoft.com/fwlink/?linkid=2210389 /// </summary> procedure SetBlobExpiryNever(BlobName: Text): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.SetBlobExpiryNever(BlobName)); end; /// <summary> /// The Set Blob Tags operation sets user-defined tags for the specified blob as one or more key-value pairs. /// see: https://go.microsoft.com/fwlink/?linkid=2211407 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="Tags">A Dictionary of [Text, Text] which contains the Tags you want to set.</param> /// <returns>An operation response object</returns> procedure SetBlobTags(BlobName: Text; Tags: Dictionary of [Text, Text]): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.SetBlobTags(BlobName, Tags)); end; /// <summary> /// The Find Blobs By Tags operation retrieves blobs based on user-defined tags for the specified blob, represented as one or more key-value pairs. /// see: https://learn.microsoft.com/nl-nl/rest/api/storageservices/find-blobs-by-tags?tabs=azure-ad /// </summary> /// <param name="SearchTags">A Dictionary of [Text, Text] with tags to search on.</param> /// <param name="FoundBlobs">An XmlDocument containing the results of the identified blobs.</param> /// <returns>An operation response object</returns> procedure FindBlobsByTags(SearchTags: Dictionary of [Text, Text]; var FoundBlobs: XmlDocument): Codeunit "ABS Operation Response" var OptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.FindBlobsByTags(SearchTags, FoundBlobs, OptionalParameters)); end; /// <summary> /// The Find Blobs By Tags operation retrieves blobs based on user-defined tags for the specified blob, represented as one or more key-value pairs. /// see: https://learn.microsoft.com/rest/api/storageservices/find-blobs-by-tags?tabs=azure-ad /// </summary> /// <param name="SearchTags">A Dictionary of [Text, Text] with tags to search on.</param> /// <param name="FoundBlobs">An XmlDocument containing the results of the identified blobs.</param> /// <param name="OptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure FindBlobsByTags(SearchTags: Dictionary of [Text, Text]; var FoundBlobs: XmlDocument; OptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.FindBlobsByTags(SearchTags, FoundBlobs, OptionalParameters)); end; /// <summary> /// The Get Blob Tags operation gets user-defined tags for the specified blob as XmlDocument. /// see: https://go.microsoft.com/fwlink/?linkid=2211502 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="Tags">The result XmlDocument with blob tags.</param> /// <returns>An operation response object</returns> procedure GetBlobTags(BlobName: Text; var Tags: XmlDocument): Codeunit "ABS Operation Response" var OptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.GetBlobTags(BlobName, Tags, OptionalParameters)) end; /// <summary> /// The Get Blob Tags operation gets user-defined tags for the specified blob as XmlDocument. /// see: https://go.microsoft.com/fwlink/?linkid=2211502 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="Tags">The result XmlDocument with blob tags.</param> /// <param name="OptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure GetBlobTags(BlobName: Text; var Tags: XmlDocument; OptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.GetBlobTags(BlobName, Tags, OptionalParameters)) end; /// <summary> /// The Get Blob Tags operation gets user-defined tags for the specified blob as one or more key-value pairs. /// see: https://go.microsoft.com/fwlink/?linkid=2211502 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="Tags">The result Dictionary of [Text, Text] with blob tags.</param> /// <returns>An operation response object</returns> procedure GetBlobTags(BlobName: Text; var Tags: Dictionary of [Text, Text]): Codeunit "ABS Operation Response" var OptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.GetBlobTags(BlobName, Tags, OptionalParameters)) end; /// <summary> /// The Get Blob Tags operation gets user-defined tags for the specified blob as one or more key-value pairs. /// see: https://go.microsoft.com/fwlink/?linkid=2211502 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="Tags">The result Dictionary of [Text, Text] with blob tags.</param> /// <param name="OptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure GetBlobTags(BlobName: Text; var Tags: Dictionary of [Text, Text]; OptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.GetBlobTags(BlobName, Tags, OptionalParameters)) end; /// <summary> /// The Get Blob Properties operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It doesn't return the content of the blob. /// see: https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties?tabs=azure-ad /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <returns>An operation response object. The Blob properties are in the response headers.</returns> procedure GetBlobProperties(BlobName: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.GetBlobProperties(BlobName, ABSOptionalParameters)); end; /// <summary> /// The Get Blob Properties operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It doesn't return the content of the blob. /// see: https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties?tabs=azure-ad /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object. The Blob properties are in the response headers.</returns> procedure GetBlobProperties(BlobName: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.GetBlobProperties(BlobName, ABSOptionalParameters)); end; /// <summary> /// The Blob Exists operation returns true if a blob exists, or false if the blob does not exist. /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <returns>True if the blob exists, false if not.</returns> procedure BlobExists(BlobName: Text): Boolean var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.BlobExists(BlobName, ABSOptionalParameters)); end; /// <summary> /// The Blob Exists operation returns true if a blob exists, or false if the blob does not exist. /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>True if the blob exists, false if not.</returns> procedure BlobExists(BlobName: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Boolean begin exit(ABSClientImpl.BlobExists(BlobName, ABSOptionalParameters)); end; /// <summary> /// The Delete Blob operation marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection. /// see: https://go.microsoft.com/fwlink/?linkid=2211408 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <returns>An operation response object</returns> procedure DeleteBlob(BlobName: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.DeleteBlob(BlobName, ABSOptionalParameters)); end; /// <summary> /// The Delete Blob operation marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection. /// see: https://go.microsoft.com/fwlink/?linkid=2211408 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure DeleteBlob(BlobName: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.DeleteBlob(BlobName, ABSOptionalParameters)); end; /// <summary> /// The Undelete Blob operation restores the contents and metadata of a soft deleted blob and any associated soft deleted snapshots (version 2017-07-29 or later) /// see: https://go.microsoft.com/fwlink/?linkid=2210390 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <returns>An operation response object</returns> procedure UndeleteBlob(BlobName: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.UndeleteBlob(BlobName, ABSOptionalParameters)); end; /// <summary> /// The Undelete Blob operation restores the contents and metadata of a soft deleted blob and any associated soft deleted snapshots (version 2017-07-29 or later) /// see: https://go.microsoft.com/fwlink/?linkid=2210390 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure UndeleteBlob(BlobName: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.UndeleteBlob(BlobName, ABSOptionalParameters)); end; /// <summary> /// The Copy Blob operation copies a blob to a destination within the storage account. /// see: https://go.microsoft.com/fwlink/?linkid=2210589 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceName">Specifies the name of the source blob or file.</param> /// <returns>An operation response object</returns> procedure CopyBlob(BlobName: Text; SourceName: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; LeaseId: Guid; begin exit(CopyBlob(BlobName, SourceName, LeaseId, ABSOptionalParameters)); end; /// <summary> /// The Copy Blob operation copies a blob to a destination within the storage account. /// see: https://go.microsoft.com/fwlink/?linkid=2210589 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceName">Specifies the name of the source blob or file.</param> /// <param name="LeaseId">Required if the destination blob has an active lease. The lease ID specified must match the lease ID of the destination blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure CopyBlob(BlobName: Text; SourceName: Text; LeaseId: Guid; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.CopyBlob(BlobName, SourceName, LeaseId, ABSOptionalParameters)); end; /// <summary> /// The Put Block List operation writes a blob by specifying the list of block IDs that make up the blob. /// see: https://go.microsoft.com/fwlink/?linkid=2210392 /// </summary> /// <param name="CommitedBlocks">Dictionary of [Text, Integer] containing the list of commited blocks that should be put to the Blob</param> /// <param name="UncommitedBlocks">Dictionary of [Text, Integer] containing the list of uncommited blocks that should be put to the Blob</param> /// <returns>An operation response object</returns> procedure PutBlockList(CommitedBlocks: Dictionary of [Text, Integer]; UncommitedBlocks: Dictionary of [Text, Integer]): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlockList('', CommitedBlocks, UncommitedBlocks)); end; /// <summary> /// The Put Block List operation writes a blob by specifying the list of block IDs that make up the blob. /// see: https://go.microsoft.com/fwlink/?linkid=2210392 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="CommitedBlocks">Dictionary of [Text, Integer] containing the list of commited blocks that should be put to the Blob</param> /// <param name="UncommitedBlocks">Dictionary of [Text, Integer] containing the list of uncommited blocks that should be put to the Blob</param> /// <returns>An operation response object</returns> procedure PutBlockList(BlobName: Text; CommitedBlocks: Dictionary of [Text, Integer]; UncommitedBlocks: Dictionary of [Text, Integer]): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlockList(BlobName, CommitedBlocks, UncommitedBlocks)); end; /// <summary> /// The Put Block operation creates a new block to be committed as part of a blob. /// see: https://learn.microsoft.com/en-us/rest/api/storageservices/put-block /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceText">The Content of the Block as Text.</param> /// <param name="BlockId">Specifies the BlockId that should be put.</param> /// <returns>An operation response object</returns> procedure PutBlockText(BlobName: Text; SourceText: Text; BlockId: Text): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlock(BlobName, SourceText, BlockId)); end; /// <summary> /// The Put Block operation creates a new block to be committed as part of a blob. /// see: https://learn.microsoft.com/en-us/rest/api/storageservices/put-block /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceText">The Content of the Block as Text.</param> /// <returns>An operation response object</returns> procedure PutBlockText(BlobName: Text; SourceText: Text): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlock(BlobName, SourceText)); end; /// <summary> /// The Put Block operation creates a new block to be committed as part of a blob. /// see: https://learn.microsoft.com/en-us/rest/api/storageservices/put-block /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceInStream">The Content of the Block as InStream.</param> /// <returns>An operation response object</returns> procedure PutBlockStream(BlobName: Text; SourceInStream: InStream): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlock(BlobName, SourceInStream)); end; /// <summary> /// The Put Block operation creates a new block to be committed as part of a blob. /// see: https://learn.microsoft.com/en-us/rest/api/storageservices/put-block /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceInStream">The Content of the Block as InStream.</param> /// <param name="BlockId">Specifies the BlockId that should be put.</param> /// <returns>An operation response object</returns> procedure PutBlockStream(BlobName: Text; SourceInStream: InStream; BlockId: Text): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlock(BlobName, SourceInStream, BlockId)); end; /// <summary> /// The Put Block From URL operation creates a new block to be committed as part of a blob where the contents are read from a URL. /// see: https://go.microsoft.com/fwlink/?linkid=2211409 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceUri">Specifies the name of the source block blob.</param> /// <param name="BlockId">Specifies the BlockId that should be put.</param> /// <returns>An operation response object</returns> procedure PutBlockFromURL(BlobName: Text; SourceUri: Text; BlockId: Text): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.PutBlockFromURL(BlobName, SourceUri, BlockId, ABSOptionalParameters)); end; /// <summary> /// The Put Block From URL operation creates a new block to be committed as part of a blob where the contents are read from a URL. /// see: https://go.microsoft.com/fwlink/?linkid=2211409 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="SourceUri">Specifies the name of the source block blob.</param> /// <param name="BlockId">Specifies the BlockId that should be put.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure PutBlockFromURL(BlobName: Text; SourceUri: Text; BlockId: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.PutBlockFromURL(BlobName, SourceUri, BlockId, ABSOptionalParameters)); end; /// <summary> /// Requests a new lease. If the blob does not have an active lease, the Blob service creates a lease on the blob. The lease duration can be 15 to 60 seconds or can be infinite /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">Guid containing the response value from x-ms-lease-id HttpHeader</param> /// <returns>An operation response object</returns> procedure AcquireLease(BlobName: Text; var LeaseId: Guid): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; ProposedLeaseId: Guid; begin exit(ABSClientImpl.BlobAcquireLease(BlobName, ABSOptionalParameters, -1, ProposedLeaseId, LeaseId)); // Infinite duration, null Guid end; /// <summary> /// Requests a new lease. If the blob does not have an active lease, the Blob service creates a lease on the blob. The lease duration can be 15 to 60 seconds or can be infinite /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <param name="LeaseId">Guid containing the response value from x-ms-lease-id HttpHeader</param> /// <returns>An operation response object</returns> procedure AcquireLease(BlobName: Text; ABSOptionalParameters: Codeunit "ABS Optional Parameters"; var LeaseId: Guid): Codeunit "ABS Operation Response" var ProposedLeaseId: Guid; begin exit(ABSClientImpl.BlobAcquireLease(BlobName, ABSOptionalParameters, -1, ProposedLeaseId, LeaseId)); // Infinite duration, null Guid end; /// <summary> /// Requests a new lease. If the blob does not have an active lease, the Blob service creates a lease on the blob. The lease duration can be 15 to 60 seconds or can be infinite /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="DurationSeconds">Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires</param> /// <param name="LeaseId">Guid containing the response value from x-ms-lease-id HttpHeader</param> /// <returns>An operation response object</returns> procedure AcquireLease(BlobName: Text; DurationSeconds: Integer; var LeaseId: Guid): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; ProposedLeaseId: Guid; begin exit(ABSClientImpl.BlobAcquireLease(BlobName, ABSOptionalParameters, DurationSeconds, ProposedLeaseId, LeaseId)); // Custom duration, null Guid end; /// <summary> /// Requests a new lease. If the blob does not have an active lease, the Blob service creates a lease on the blob. The lease duration can be 15 to 60 seconds or can be infinite /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="DurationSeconds">Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <param name="LeaseId">Guid containing the response value from x-ms-lease-id HttpHeader</param> /// <returns>An operation response object</returns> procedure AcquireLease(BlobName: Text; DurationSeconds: Integer; ABSOptionalParameters: Codeunit "ABS Optional Parameters"; var LeaseId: Guid): Codeunit "ABS Operation Response" var ProposedLeaseId: Guid; begin exit(ABSClientImpl.BlobAcquireLease(BlobName, ABSOptionalParameters, DurationSeconds, ProposedLeaseId, LeaseId)); // Custom duration, null Guid end; /// <summary> /// Requests a new lease. If the blob does not have an active lease, the Blob service creates a lease on the blob. The lease duration can be 15 to 60 seconds or can be infinite /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ProposedLeaseId">Proposed lease ID, in a GUID string format</param> /// <param name="LeaseId">Guid containing the response value from x-ms-lease-id HttpHeader</param> /// <returns>An operation response object</returns> procedure AcquireLease(BlobName: Text; ProposedLeaseId: Guid; var LeaseId: Guid): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.BlobAcquireLease(BlobName, ABSOptionalParameters, -1, ProposedLeaseId, LeaseId)); // Infinite duration, custom Guid end; /// <summary> /// Requests a new lease. If the blob does not have an active lease, the Blob service creates a lease on the blob. The lease duration can be 15 to 60 seconds or can be infinite /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="ProposedLeaseId">Proposed lease ID, in a GUID string format</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <param name="LeaseId">Guid containing the response value from x-ms-lease-id HttpHeader</param> /// <returns>An operation response object</returns> procedure AcquireLease(BlobName: Text; ProposedLeaseId: Guid; ABSOptionalParameters: Codeunit "ABS Optional Parameters"; var LeaseId: Guid): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.BlobAcquireLease(BlobName, ABSOptionalParameters, -1, ProposedLeaseId, LeaseId)); // Infinite duration, custom Guid end; /// <summary> /// Requests a new lease. If the blob does not have an active lease, the Blob service creates a lease on the blob. The lease duration can be 15 to 60 seconds or can be infinite /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="DurationSeconds">Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires</param> /// <param name="ProposedLeaseId">Proposed lease ID, in a GUID string format</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <param name="LeaseId">Guid containing the response value from x-ms-lease-id HttpHeader</param> /// <returns>An operation response object</returns> procedure AcquireLease(BlobName: Text; DurationSeconds: Integer; ProposedLeaseId: Guid; ABSOptionalParameters: Codeunit "ABS Optional Parameters"; var LeaseId: Guid): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.BlobAcquireLease(BlobName, ABSOptionalParameters, DurationSeconds, ProposedLeaseId, LeaseId)); end; /// <summary> /// Releases a lease on a Blob if it is no longer needed so that another client may immediately acquire a lease against the blob /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">The Guid for the lease that should be released</param> /// <returns>An operation response object</returns> procedure ReleaseLease(BlobName: Text; LeaseId: Guid): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.BlobReleaseLease(BlobName, ABSOptionalParameters, LeaseId)); end; /// <summary> /// Releases a lease on a Blob if it is no longer needed so that another client may immediately acquire a lease against the blob /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">The Guid for the lease that should be released</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure ReleaseLease(BlobName: Text; LeaseId: Guid; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.BlobReleaseLease(BlobName, ABSOptionalParameters, LeaseId)); end; /// <summary> /// Renews a lease on a Blob to keep it locked again for the same amount of time as before /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">The Guid for the lease that should be renewed</param> /// <returns>An operation response object</returns> procedure RenewLease(BlobName: Text; LeaseId: Guid): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.BlobRenewLease(BlobName, ABSOptionalParameters, LeaseId)); end; /// <summary> /// Renews a lease on a Blob to keep it locked again for the same amount of time as before /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">The Guid for the lease that should be renewed</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure RenewLease(BlobName: Text; LeaseId: Guid; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.BlobRenewLease(BlobName, ABSOptionalParameters, LeaseId)); end; /// <summary> /// Breaks a lease on a blob but ensures that another client cannot acquire a new lease until the current lease period has expired /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">The Guid for the lease that should be broken</param> /// <returns>An operation response object</returns> procedure BreakLease(BlobName: Text; LeaseId: Guid): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.BlobBreakLease(BlobName, ABSOptionalParameters, LeaseId, 0)); end; /// <summary> /// Breaks a lease on a blob but ensures that another client cannot acquire a new lease until the current lease period has expired /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">The Guid for the lease that should be broken</param> /// <param name="LeaseBreakPeriod">The proposed duration the lease should continue before it is broken, in seconds, between 0 and 60.</param> /// <returns>An operation response object</returns> procedure BreakLease(BlobName: Text; LeaseId: Guid; LeaseBreakPeriod: Integer): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.BlobBreakLease(BlobName, ABSOptionalParameters, LeaseId, LeaseBreakPeriod)); end; /// <summary> /// Breaks a lease on a blob but ensures that another client cannot acquire a new lease until the current lease period has expired /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">The Guid for the lease that should be broken</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure BreakLease(BlobName: Text; LeaseId: Guid; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.BlobBreakLease(BlobName, ABSOptionalParameters, LeaseId, 0)); end; /// <summary> /// Breaks a lease on a blob but ensures that another client cannot acquire a new lease until the current lease period has expired /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">The Guid for the lease that should be broken</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <param name="LeaseBreakPeriod">The proposed duration the lease should continue before it is broken, in seconds, between 0 and 60.</param> /// <returns>An operation response object</returns> procedure BreakLease(BlobName: Text; LeaseId: Guid; ABSOptionalParameters: Codeunit "ABS Optional Parameters"; LeaseBreakPeriod: Integer): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.BlobBreakLease(BlobName, ABSOptionalParameters, LeaseId, LeaseBreakPeriod)); end; /// <summary> /// Changes the lease ID of an active lease /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">The Guid for the lease that should be changed. Will contain the updated Guid after successful operation.</param> /// <param name="ProposedLeaseId">The Guid that should be used in future</param> /// <returns>An operation response object</returns> procedure ChangeLease(BlobName: Text; var LeaseId: Guid; ProposedLeaseId: Guid): Codeunit "ABS Operation Response" var ABSOptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.BlobChangeLease(BlobName, ABSOptionalParameters, LeaseId, ProposedLeaseId)); end; /// <summary> /// Changes the lease ID of an active lease /// see: https://go.microsoft.com/fwlink/?linkid=2210391 /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="LeaseId">The Guid for the lease that should be changed</param> /// <param name="ProposedLeaseId">The Guid that should be used in future</param> /// <param name="ABSOptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure ChangeLease(BlobName: Text; LeaseId: Guid; ProposedLeaseId: Guid; ABSOptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.BlobChangeLease(BlobName, ABSOptionalParameters, LeaseId, ProposedLeaseId)); end; /// <summary> /// The GetBlobMetadata operation gets user-defined Metadata for the specified blob as one or more key-value pairs. /// see: https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-metadata?tabs=microsoft-entra-id /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="Metadata">The result Dictionary of [Text, Text] with blob metadata.</param> /// <returns>An operation response object</returns> procedure GetBlobMetadata(BlobName: Text; var Metadata: Dictionary of [Text, Text]): Codeunit "ABS Operation Response" var OptionalParameters: Codeunit "ABS Optional Parameters"; begin exit(ABSClientImpl.GetBlobMetadata(BlobName, Metadata, OptionalParameters)) end; /// <summary> /// The GetBlobMetadata operation gets user-defined Metadata for the specified blob as one or more key-value pairs. /// see: https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-metadata?tabs=microsoft-entra-id /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="Metadata">The result Dictionary of [Text, Text] with blob metadata.</param> /// <param name="OptionalParameters">Optional parameters to pass.</param> /// <returns>An operation response object</returns> procedure GetBlobMetaData(BlobName: Text; var Metadata: Dictionary of [Text, Text]; OptionalParameters: Codeunit "ABS Optional Parameters"): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.GetBlobMetadata(BlobName, MetaData, OptionalParameters)) end; /// <summary> /// The SetBlobMetadata operation sets user-defined Metadata for the specified blob as one or more key-value pairs. /// see: https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata?tabs=microsoft-entra-id /// </summary> /// <param name="BlobName">The name of the blob.</param> /// <param name="Metadata">The result Dictionary of [Text, Text] with blob metadata.</param> /// <returns>An operation response object</returns> procedure SetBlobMetadata(BlobName: Text; Metadata: Dictionary of [Text, Text]): Codeunit "ABS Operation Response" begin exit(ABSClientImpl.SetBlobMetadata(BlobName, MetaData)); end; var ABSClientImpl: Codeunit "ABS Client Impl.";}