Jit Network Access Policies - Initiate
Initiate a JIT access from a specific Just-in-Time policy configuration.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/jitNetworkAccessPolicies/{jitNetworkAccessPolicyName}/initiate?api-version=2020-01-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
asc
|
path | True |
string |
The location where ASC stores the data of the subscription. can be retrieved from Get locations |
jit
|
path | True |
Type of the action to do on the Just-in-Time access policy. |
|
jit
|
path | True |
string |
Name of a Just-in-Time access configuration policy. |
resource
|
path | True |
string |
The name of the resource group within the user's subscription. The name is case insensitive. Regex pattern: |
subscription
|
path | True |
string |
Azure subscription ID Regex pattern: |
api-version
|
query | True |
string |
API version for the operation |
Request Body
Name | Required | Type | Description |
---|---|---|---|
virtualMachines | True |
A list of virtual machines & ports to open access for |
|
justification |
string |
The justification for making the initiate request |
Responses
Name | Type | Description |
---|---|---|
202 Accepted |
Accepted |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Initiate an action on a JIT network access policy
Sample request
POST https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/westeurope/jitNetworkAccessPolicies/default/initiate?api-version=2020-01-01
{
"virtualMachines": [
{
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1",
"ports": [
{
"number": 3389,
"duration": "PT1H",
"allowedSourceAddressPrefix": "192.127.0.2"
}
]
}
],
"justification": "testing a new version of the product"
}
Sample response
{
"virtualMachines": [
{
"id": "/subscriptions/3eeab341-f466-499c-a8be-85427e154baf/resourceGroups/myRg1/providers/Microsoft.Compute/virtualMachines/vm1",
"ports": [
{
"number": 3389,
"allowedSourceAddressPrefix": "192.127.0.2",
"endTimeUtc": "2018-07-12T09:53:03.3658798Z",
"status": "Initiating",
"statusReason": "UserRequested"
}
]
}
],
"startTimeUtc": "2018-07-12T08:53:03.3658798Z",
"requestor": "[email protected]",
"justification": "testing a new version of the product"
}
Definitions
Name | Description |
---|---|
Cloud |
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). |
Cloud |
The error detail. |
Error |
The resource management error additional info. |
Jit |
|
Jit |
|
Jit |
Type of the action to do on the Just-in-Time access policy. |
Jit |
|
Jit |
|
Jit |
|
Jit |
|
status |
The status of the port |
status |
A description of why the |
CloudError
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
Name | Type | Description |
---|---|---|
error.additionalInfo |
The error additional info. |
|
error.code |
string |
The error code. |
error.details |
The error details. |
|
error.message |
string |
The error message. |
error.target |
string |
The error target. |
CloudErrorBody
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
JitNetworkAccessPolicyInitiatePort
Name | Type | Description |
---|---|---|
allowedSourceAddressPrefix |
string |
Source of the allowed traffic. If omitted, the request will be for the source IP address of the initiate request. |
endTimeUtc |
string |
The time to close the request in UTC |
number |
integer |
JitNetworkAccessPolicyInitiateRequest
Name | Type | Description |
---|---|---|
justification |
string |
The justification for making the initiate request |
virtualMachines |
A list of virtual machines & ports to open access for |
JitNetworkAccessPolicyInitiateType
Type of the action to do on the Just-in-Time access policy.
Name | Type | Description |
---|---|---|
initiate |
string |
JitNetworkAccessPolicyInitiateVirtualMachine
Name | Type | Description |
---|---|---|
id |
string |
Resource ID of the virtual machine that is linked to this policy |
ports |
The ports to open for the resource with the |
JitNetworkAccessRequest
Name | Type | Description |
---|---|---|
justification |
string |
The justification for making the initiate request |
requestor |
string |
The identity of the person who made the request |
startTimeUtc |
string |
The start time of the request in UTC |
virtualMachines |
JitNetworkAccessRequestPort
Name | Type | Description |
---|---|---|
allowedSourceAddressPrefix |
string |
Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16". |
allowedSourceAddressPrefixes |
string[] |
Mutually exclusive with the "allowedSourceAddressPrefix" parameter. |
endTimeUtc |
string |
The date & time at which the request ends in UTC |
mappedPort |
integer |
The port which is mapped to this port's |
number |
integer |
|
status |
The status of the port |
|
statusReason |
A description of why the |
JitNetworkAccessRequestVirtualMachine
Name | Type | Description |
---|---|---|
id |
string |
Resource ID of the virtual machine that is linked to this policy |
ports |
The ports that were opened for the virtual machine |
status
The status of the port
Name | Type | Description |
---|---|---|
Initiated |
string |
|
Revoked |
string |
statusReason
A description of why the status
has its value
Name | Type | Description |
---|---|---|
Expired |
string |
|
NewerRequestInitiated |
string |
|
UserRequested |
string |