encryption_scopes
Creates, updates, deletes, gets or lists an encryption_scopes resource.
Overview
| Name | encryption_scopes |
| Type | Resource |
| Id | azure.storage.encryption_scopes |
Fields
The following fields are returned by SELECT queries:
- get
- 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. |
creationTime | string (date-time) | Gets the creation date and time of the encryption scope in UTC. |
keyVaultProperties | object | The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'. |
lastModifiedTime | string (date-time) | Gets the last modification date and time of the encryption scope in UTC. |
requireInfrastructureEncryption | boolean | A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest. |
source | string | The 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) |
state | string | The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
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". |
| 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. |
creationTime | string (date-time) | Gets the creation date and time of the encryption scope in UTC. |
keyVaultProperties | object | The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'. |
lastModifiedTime | string (date-time) | Gets the last modification date and time of the encryption scope in UTC. |
requireInfrastructureEncryption | boolean | A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest. |
source | string | The 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) |
state | string | The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
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 |
|---|---|---|---|---|
get | select | resource_group_name, account_name, encryption_scope_name, subscription_id | Returns the properties for the specified encryption scope. | |
list | select | resource_group_name, account_name, subscription_id | $maxpagesize, $filter, $include | Lists all the encryption scopes available under the specified storage account. |
put | exec | resource_group_name, account_name, encryption_scope_name, subscription_id | 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. | |
patch | exec | resource_group_name, account_name, encryption_scope_name, subscription_id | Update 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.
| 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. |
encryption_scope_name | string | The 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_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
$filter | string | Optional. When specified, only encryption scope names starting with the filter will be listed. Default value is None. |
$include | string | Optional, when specified, will list encryption scopes with the specific state. Defaults to All. Known values are: "All", "Enabled", and "Disabled". Default value is None. |
$maxpagesize | integer |
SELECT examples
- get
- list
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
;
Lists all the encryption scopes available under the specified storage account.
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 subscription_id = '{{ subscription_id }}' -- required
AND $maxpagesize = '{{ $maxpagesize }}'
AND $filter = '{{ $filter }}'
AND $include = '{{ $include }}'
;
Lifecycle Methods
- put
- patch
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 }}"
}'
;
Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.
EXEC azure.storage.encryption_scopes.patch
@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 }}"
}'
;