blob_services
Creates, updates, deletes, gets or lists a blob_services resource.
Overview
| Name | blob_services |
| Type | Resource |
| Id | azure.storage.blob_services |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
automaticSnapshotPolicyEnabled | boolean | Deprecated in favor of isVersioningEnabled property. |
changeFeed | object | The blob service properties for change feed events. |
containerDeleteRetentionPolicy | object | The blob service properties for container soft delete. |
cors | object | Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. |
defaultServiceVersion | string | DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. |
deleteRetentionPolicy | object | The blob service properties for blob soft delete. |
isVersioningEnabled | boolean | Versioning is enabled if set to true. |
lastAccessTimeTrackingPolicy | object | The blob service property to configure last access time based tracking policy. |
restorePolicy | object | The blob service properties for blob restore policy. |
sku | object | Sku name and tier. |
staticWebsite | object | The static website properties for blob storage. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | resource_group_name, account_name, subscription_id | List blob services of storage account. It returns a collection of one object named default. | |
get_service_properties | exec | resource_group_name, account_name, subscription_id | Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. | |
set_service_properties | exec | resource_group_name, account_name, subscription_id | Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_name | string | The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- list
List blob services of storage account. It returns a collection of one object named default.
SELECT
id,
name,
automaticSnapshotPolicyEnabled,
changeFeed,
containerDeleteRetentionPolicy,
cors,
defaultServiceVersion,
deleteRetentionPolicy,
isVersioningEnabled,
lastAccessTimeTrackingPolicy,
restorePolicy,
sku,
staticWebsite,
systemData,
type
FROM azure.storage.blob_services
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lifecycle Methods
- get_service_properties
- set_service_properties
Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
EXEC azure.storage.blob_services.get_service_properties
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
EXEC azure.storage.blob_services.set_service_properties
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;