ServiceURL class
A ServiceURL represents a URL to the Azure Storage Blob service allowing you to manipulate blob containers.
- Extends
Constructors
| ServiceURL(string, Pipeline) | Creates an instance of ServiceURL. |
Properties
| credential | Credential used for authentication and authorization. |
| pipeline | Request policy pipeline. |
| url | Encoded URL string value. |
Methods
| get |
The Get Account Information operation returns the sku name and account kind for the specified account. The Get Account Information operation is available on service versions beginning with version 2018-03-28. |
| get |
Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. |
| get |
Retrieves statistics related to replication for the Blob service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account. |
| get |
ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token authentication. |
| list |
Returns a list of the containers under the specified account. |
| new |
A static method used to create a new Pipeline object with Credential provided. |
| set |
Sets properties for a storage account’s Blob service endpoint, including properties for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. |
| submit |
Submit batch request which consists of multiple subrequests. |
| with |
Creates a new ServiceURL object identical to the source but with the specified request policy pipeline. |
Constructor Details
ServiceURL(string, Pipeline)
Creates an instance of ServiceURL.
new ServiceURL(url: string, pipeline: Pipeline)
Parameters
- url
-
string
A URL string pointing to Azure Storage blob service, such as "https://myaccount.blob.core.windows.net". You can append a SAS if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
- pipeline
- Pipeline
Call StorageURL.newPipeline() to create a default pipeline, or provide a customized pipeline.
Property Details
credential
Credential used for authentication and authorization.
credential: Credential
Property Value
pipeline
url
Encoded URL string value.
url: string
Property Value
string
Method Details
getAccountInfo(Aborter)
The Get Account Information operation returns the sku name and account kind for the specified account. The Get Account Information operation is available on service versions beginning with version 2018-03-28.
function getAccountInfo(aborter: Aborter)
Parameters
- aborter
- Aborter
Create a new Aborter instance with Aborter.none or Aborter.timeout(), goto documents of Aborter for more examples about request cancellation
Returns
Promise<Models.ServiceGetAccountInfoResponse>
getProperties(Aborter)
Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
function getProperties(aborter: Aborter)
Parameters
- aborter
- Aborter
Create a new Aborter instance with Aborter.none or Aborter.timeout(), goto documents of Aborter for more examples about request cancellation
Returns
Promise<Models.ServiceGetPropertiesResponse>
getStatistics(Aborter)
Retrieves statistics related to replication for the Blob service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account.
function getStatistics(aborter: Aborter)
Parameters
- aborter
- Aborter
Returns
Promise<Models.ServiceGetStatisticsResponse>
getUserDelegationKey(Aborter, Date, Date)
ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token authentication.
function getUserDelegationKey(aborter: Aborter, start: Date, expiry: Date)
Parameters
- aborter
- Aborter
Create a new Aborter instance with Aborter.none or Aborter.timeout(), goto documents of Aborter for more examples about request cancellation
- start
-
Date
The start time for the user delegation SAS. Must be within 7 days of the current time
- expiry
-
Date
The end time for the user delegation SAS. Must be within 7 days of the current time
Returns
Promise<ServiceGetUserDelegationKeyResponse>
listContainersSegment(Aborter, undefined | string, IServiceListContainersSegmentOptions)
Returns a list of the containers under the specified account.
function listContainersSegment(aborter: Aborter, marker?: undefined | string, options?: IServiceListContainersSegmentOptions)
Parameters
- aborter
- Aborter
Create a new Aborter instance with Aborter.none or Aborter.timeout(), goto documents of Aborter for more examples about request cancellation
- marker
-
undefined | string
Returns
Promise<Models.ServiceListContainersSegmentResponse>
newPipeline(Credential, INewPipelineOptions)
A static method used to create a new Pipeline object with Credential provided.
static function newPipeline(credential: Credential, pipelineOptions?: INewPipelineOptions)
Parameters
- credential
- Credential
Such as AnonymousCredential, SharedKeyCredential or TokenCredential.
- pipelineOptions
- INewPipelineOptions
Returns
A new Pipeline object.
setProperties(Aborter, StorageServiceProperties)
Sets properties for a storage account’s Blob service endpoint, including properties for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
function setProperties(aborter: Aborter, properties: StorageServiceProperties)
Parameters
- aborter
- Aborter
Create a new Aborter instance with Aborter.none or Aborter.timeout(), goto documents of Aborter for more examples about request cancellation
- properties
- StorageServiceProperties
Returns
Promise<Models.ServiceSetPropertiesResponse>
submitBatch(Aborter, BatchRequest, Models.ServiceSubmitBatchOptionalParams)
Submit batch request which consists of multiple subrequests.
function submitBatch(aborter: Aborter, batchRequest: BatchRequest, options?: Models.ServiceSubmitBatchOptionalParams)
Parameters
- aborter
- Aborter
Create a new Aborter instance with Aborter.none or Aborter.timeout(), goto documents of Aborter for more examples about request cancellation.
- batchRequest
- BatchRequest
Supported batch request: BatchDeleteRequest or BatchSetTierRequest.
- options
- Models.ServiceSubmitBatchOptionalParams
Returns
Promise<ServiceSubmitBatchResponse>
withPipeline(Pipeline)
Creates a new ServiceURL object identical to the source but with the specified request policy pipeline.
function withPipeline(pipeline: Pipeline)
Parameters
- pipeline
- Pipeline