Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ApplicationClientDetails(Model):
"""The application client details to track the entity creating/updating the
managed app resource.

:param oid: The client Oid.
:type oid: str
:param puid: The client Puid
:type puid: str
:param application_id: The client application Id.
:type application_id: str
"""

_attribute_map = {
'oid': {'key': 'Oid', 'type': 'str'},
'puid': {'key': 'Puid', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ApplicationClientDetails, self).__init__(**kwargs)
self.oid = kwargs.get('oid', None)
self.puid = kwargs.get('puid', None)
self.application_id = kwargs.get('application_id', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ApplicationClientDetails(Model):
"""The application client details to track the entity creating/updating the
managed app resource.

:param oid: The client Oid.
:type oid: str
:param puid: The client Puid
:type puid: str
:param application_id: The client application Id.
:type application_id: str
"""

_attribute_map = {
'oid': {'key': 'Oid', 'type': 'str'},
'puid': {'key': 'Puid', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
}

def __init__(self, *, oid: str=None, puid: str=None, application_id: str=None, **kwargs) -> None:
super(ApplicationClientDetails, self).__init__(**kwargs)
self.oid = oid
self.puid = puid
self.application_id = application_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class JitAuthorizationPolicies(Model):
"""The JIT authorization policies.

All required parameters must be populated in order to send to Azure.

:param principal_id: Required. The the principal id that will be granted
JIT access.
:type principal_id: str
:param role_definition_id: Required. The role definition id that will be
granted to the Principal.
:type role_definition_id: str
"""

_validation = {
'principal_id': {'required': True},
'role_definition_id': {'required': True},
}

_attribute_map = {
'principal_id': {'key': 'PrincipalId', 'type': 'str'},
'role_definition_id': {'key': 'RoleDefinitionId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(JitAuthorizationPolicies, self).__init__(**kwargs)
self.principal_id = kwargs.get('principal_id', None)
self.role_definition_id = kwargs.get('role_definition_id', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class JitAuthorizationPolicies(Model):
"""The JIT authorization policies.

All required parameters must be populated in order to send to Azure.

:param principal_id: Required. The the principal id that will be granted
JIT access.
:type principal_id: str
:param role_definition_id: Required. The role definition id that will be
granted to the Principal.
:type role_definition_id: str
"""

_validation = {
'principal_id': {'required': True},
'role_definition_id': {'required': True},
}

_attribute_map = {
'principal_id': {'key': 'PrincipalId', 'type': 'str'},
'role_definition_id': {'key': 'RoleDefinitionId', 'type': 'str'},
}

def __init__(self, *, principal_id: str, role_definition_id: str, **kwargs) -> None:
super(JitAuthorizationPolicies, self).__init__(**kwargs)
self.principal_id = principal_id
self.role_definition_id = role_definition_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource


class JitRequestDefinition(Resource):
"""Information about JIT request definition.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar id: Resource ID
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param location: Resource location
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
:param application_resource_id: Required. The parent application id.
:type application_resource_id: str
:param publisher_tenant_id: The publisher tenant id.
:type publisher_tenant_id: str
:param jit_authorization_policies: Required. The JIT authorization
policies.
:type jit_authorization_policies:
list[~azure.mgmt.resource.managedapplications.models.JitAuthorizationPolicies]
:param jit_scheduling_policy: Required. The JIT request properties.
:type jit_scheduling_policy:
~azure.mgmt.resource.managedapplications.models.JitRequestProperties
:ivar provisioning_state: The JIT request provisioning state. Possible
values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created',
'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating'
:vartype provisioning_state: str or
~azure.mgmt.resource.managedapplications.models.ProvisioningState
:ivar jit_request_state: The JIT request state. Possible values include:
'NotSpecified', 'Pending', 'Approved', 'Denied', 'Failed', 'Canceled',
'Expired', 'Timeout'
:vartype jit_request_state: str or
~azure.mgmt.resource.managedapplications.models.JitRequestState
:param created_by: The client entity that created the JIT request.
:type created_by:
~azure.mgmt.resource.managedapplications.models.ApplicationClientDetails
:param updated_by: The client entity that last updated the JIT request.
:type updated_by:
~azure.mgmt.resource.managedapplications.models.ApplicationClientDetails
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'application_resource_id': {'required': True},
'jit_authorization_policies': {'required': True},
'jit_scheduling_policy': {'required': True},
'provisioning_state': {'readonly': True},
'jit_request_state': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'application_resource_id': {'key': 'properties.ApplicationResourceId', 'type': 'str'},
'publisher_tenant_id': {'key': 'properties.PublisherTenantId', 'type': 'str'},
'jit_authorization_policies': {'key': 'properties.JitAuthorizationPolicies', 'type': '[JitAuthorizationPolicies]'},
'jit_scheduling_policy': {'key': 'properties.JitSchedulingPolicy', 'type': 'JitRequestProperties'},
'provisioning_state': {'key': 'properties.ProvisioningState', 'type': 'str'},
'jit_request_state': {'key': 'properties.JitRequestState', 'type': 'str'},
'created_by': {'key': 'properties.CreatedBy', 'type': 'ApplicationClientDetails'},
'updated_by': {'key': 'properties.UpdatedBy', 'type': 'ApplicationClientDetails'},
}

def __init__(self, **kwargs):
super(JitRequestDefinition, self).__init__(**kwargs)
self.application_resource_id = kwargs.get('application_resource_id', None)
self.publisher_tenant_id = kwargs.get('publisher_tenant_id', None)
self.jit_authorization_policies = kwargs.get('jit_authorization_policies', None)
self.jit_scheduling_policy = kwargs.get('jit_scheduling_policy', None)
self.provisioning_state = None
self.jit_request_state = None
self.created_by = kwargs.get('created_by', None)
self.updated_by = kwargs.get('updated_by', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class JitRequestDefinitionListResult(Model):
"""List of managed applications.

:param value: The array of Jit request definition.
:type value:
list[~azure.mgmt.resource.managedapplications.models.JitRequestDefinition]
:param next_link: The URL to use for getting the next set of results.
:type next_link: str
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[JitRequestDefinition]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}

def __init__(self, **kwargs):
super(JitRequestDefinitionListResult, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class JitRequestDefinitionListResult(Model):
"""List of managed applications.

:param value: The array of Jit request definition.
:type value:
list[~azure.mgmt.resource.managedapplications.models.JitRequestDefinition]
:param next_link: The URL to use for getting the next set of results.
:type next_link: str
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[JitRequestDefinition]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}

def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None:
super(JitRequestDefinitionListResult, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
Loading