Skip to main content

jit_network_access_policies

Creates, updates, deletes, gets or lists a jit_network_access_policies resource.

Overview

Namejit_network_access_policies
TypeResource
Idazure.security.jit_network_access_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
kindstringKind of the resource
locationstringLocation where the resource is stored
propertiesobject
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
getselectsubscriptionId, resourceGroupName, ascLocation, jitNetworkAccessPolicyNameapi-versionPolicies for protecting resources using Just-in-Time access control for the subscription, location
list_by_resource_group_and_regionselectsubscriptionId, resourceGroupName, ascLocationapi-versionPolicies for protecting resources using Just-in-Time access control for the subscription, location
list_by_regionselectsubscriptionId, ascLocationapi-versionPolicies for protecting resources using Just-in-Time access control for the subscription, location
list_by_resource_groupselectsubscriptionId, resourceGroupNameapi-versionPolicies for protecting resources using Just-in-Time access control for the subscription, location
listselectsubscriptionIdapi-versionPolicies for protecting resources using Just-in-Time access control.
create_or_updateinsertsubscriptionId, resourceGroupName, ascLocation, jitNetworkAccessPolicyName, data__propertiesapi-versionCreate a policy for protecting resources using Just-in-Time access control
deletedeletesubscriptionId, resourceGroupName, ascLocation, jitNetworkAccessPolicyNameapi-versionDelete a Just-in-Time access control policy.
initiateexecsubscriptionId, resourceGroupName, ascLocation, jitNetworkAccessPolicyName, jitNetworkAccessPolicyInitiateType, virtualMachinesapi-versionInitiate a JIT access from a specific Just-in-Time policy configuration.

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
ascLocationstringThe location where ASC stores the data of the subscription. can be retrieved from Get locations
jitNetworkAccessPolicyInitiateTypestringType of the action to do on the Just-in-Time access policy.
jitNetworkAccessPolicyNamestringName of a Just-in-Time access configuration policy.
resourceGroupNamestringThe name of the resource group within the user's subscription. The name is case insensitive.
subscriptionIdstringAzure subscription ID
api-versionstringAPI version for the operation

SELECT examples

Policies for protecting resources using Just-in-Time access control for the subscription, location

SELECT
id,
name,
kind,
location,
properties,
systemData,
type
FROM azure.security.jit_network_access_policies
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND ascLocation = '{{ ascLocation }}' -- required
AND jitNetworkAccessPolicyName = '{{ jitNetworkAccessPolicyName }}' -- required
AND api-version = '{{ api-version }}'
;

INSERT examples

Create a policy for protecting resources using Just-in-Time access control

INSERT INTO azure.security.jit_network_access_policies (
data__properties,
data__kind,
subscriptionId,
resourceGroupName,
ascLocation,
jitNetworkAccessPolicyName,
api-version
)
SELECT
'{{ properties }}' /* required */,
'{{ kind }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ ascLocation }}',
'{{ jitNetworkAccessPolicyName }}',
'{{ api-version }}'
RETURNING
id,
name,
kind,
location,
properties,
systemData,
type
;

DELETE examples

Delete a Just-in-Time access control policy.

DELETE FROM azure.security.jit_network_access_policies
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND ascLocation = '{{ ascLocation }}' --required
AND jitNetworkAccessPolicyName = '{{ jitNetworkAccessPolicyName }}' --required
AND api-version = '{{ api-version }}'
;

Lifecycle Methods

Initiate a JIT access from a specific Just-in-Time policy configuration.

EXEC azure.security.jit_network_access_policies.initiate 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@ascLocation='{{ ascLocation }}' --required,
@jitNetworkAccessPolicyName='{{ jitNetworkAccessPolicyName }}' --required,
@jitNetworkAccessPolicyInitiateType='{{ jitNetworkAccessPolicyInitiateType }}' --required,
@api-version='{{ api-version }}'
@@json=
'{
"virtualMachines": "{{ virtualMachines }}",
"justification": "{{ justification }}"
}'
;