Skip to main content

encryption_scopes

Creates, updates, deletes, gets or lists an encryption_scopes resource.

Overview​

Nameencryption_scopes
TypeResource
Idazure.storage.encryption_scopes

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
creationTimestring (date-time)Gets the creation date and time of the encryption scope in UTC.
keyVaultPropertiesobjectThe key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.
lastModifiedTimestring (date-time)Gets the last modification date and time of the encryption scope in UTC.
requireInfrastructureEncryptionbooleanA boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest.
sourcestringThe provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. Known values are: "Microsoft.Storage" and "Microsoft.KeyVault". (Microsoft.Storage, Microsoft.KeyVault)
statestringThe state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Known values are: "Enabled" and "Disabled". (Enabled, Disabled)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, encryption_scope_name, subscription_idReturns the properties for the specified encryption scope.
listselectresource_group_name, account_name, subscription_id$maxpagesize, $filter, $includeLists all the encryption scopes available under the specified storage account.
putexecresource_group_name, account_name, encryption_scope_name, subscription_idSynchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.
patchexecresource_group_name, account_name, encryption_scope_name, subscription_idUpdate encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.

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.

NameDatatypeDescription
account_namestringThe 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.
encryption_scope_namestringThe name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$filterstringOptional. When specified, only encryption scope names starting with the filter will be listed. Default value is None.
$includestringOptional, when specified, will list encryption scopes with the specific state. Defaults to All. Known values are: "All", "Enabled", and "Disabled". Default value is None.
$maxpagesizeinteger

SELECT examples​

Returns the properties for the specified encryption scope.

SELECT
id,
name,
creationTime,
keyVaultProperties,
lastModifiedTime,
requireInfrastructureEncryption,
source,
state,
systemData,
type
FROM azure.storage.encryption_scopes
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND encryption_scope_name = '{{ encryption_scope_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods​

Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.

EXEC azure.storage.encryption_scopes.put
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@encryption_scope_name='{{ encryption_scope_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;