Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR network/resource-manager] Application gateway Identity and Keyvault support #3842

Merged
merged 1 commit into from
Nov 20, 2018
Merged
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
Expand Up @@ -71,6 +71,8 @@
from .application_gateway_firewall_exclusion_py3 import ApplicationGatewayFirewallExclusion
from .application_gateway_web_application_firewall_configuration_py3 import ApplicationGatewayWebApplicationFirewallConfiguration
from .application_gateway_autoscale_configuration_py3 import ApplicationGatewayAutoscaleConfiguration
from .managed_service_identity_user_assigned_identities_value_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue
from .managed_service_identity_py3 import ManagedServiceIdentity
from .application_gateway_py3 import ApplicationGateway
from .application_gateway_firewall_rule_py3 import ApplicationGatewayFirewallRule
from .application_gateway_firewall_rule_group_py3 import ApplicationGatewayFirewallRuleGroup
Expand Down Expand Up @@ -349,6 +351,8 @@
from .application_gateway_firewall_exclusion import ApplicationGatewayFirewallExclusion
from .application_gateway_web_application_firewall_configuration import ApplicationGatewayWebApplicationFirewallConfiguration
from .application_gateway_autoscale_configuration import ApplicationGatewayAutoscaleConfiguration
from .managed_service_identity_user_assigned_identities_value import ManagedServiceIdentityUserAssignedIdentitiesValue
from .managed_service_identity import ManagedServiceIdentity
from .application_gateway import ApplicationGateway
from .application_gateway_firewall_rule import ApplicationGatewayFirewallRule
from .application_gateway_firewall_rule_group import ApplicationGatewayFirewallRuleGroup
Expand Down Expand Up @@ -650,6 +654,7 @@
ApplicationGatewayRedirectType,
ApplicationGatewayOperationalState,
ApplicationGatewayFirewallMode,
ResourceIdentityType,
ProvisioningState,
AzureFirewallRCActionType,
AzureFirewallApplicationRuleProtocolType,
Expand Down Expand Up @@ -782,6 +787,8 @@
'ApplicationGatewayFirewallExclusion',
'ApplicationGatewayWebApplicationFirewallConfiguration',
'ApplicationGatewayAutoscaleConfiguration',
'ManagedServiceIdentityUserAssignedIdentitiesValue',
'ManagedServiceIdentity',
'ApplicationGateway',
'ApplicationGatewayFirewallRule',
'ApplicationGatewayFirewallRuleGroup',
Expand Down Expand Up @@ -1082,6 +1089,7 @@
'ApplicationGatewayRedirectType',
'ApplicationGatewayOperationalState',
'ApplicationGatewayFirewallMode',
'ResourceIdentityType',
'ProvisioningState',
'AzureFirewallRCActionType',
'AzureFirewallApplicationRuleProtocolType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ class ApplicationGateway(Resource):
:param zones: A list of availability zones denoting where the resource
needs to come from.
:type zones: list[str]
:param identity: The identity of the application gateway, if configured.
:type identity:
~azure.mgmt.network.v2018_10_01.models.ManagedServiceIdentity
"""

_validation = {
Expand Down Expand Up @@ -159,6 +162,7 @@ class ApplicationGateway(Resource):
'custom_error_configurations': {'key': 'properties.customErrorConfigurations', 'type': '[ApplicationGatewayCustomError]'},
'etag': {'key': 'etag', 'type': 'str'},
'zones': {'key': 'zones', 'type': '[str]'},
'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -189,3 +193,4 @@ def __init__(self, **kwargs):
self.custom_error_configurations = kwargs.get('custom_error_configurations', None)
self.etag = kwargs.get('etag', None)
self.zones = kwargs.get('zones', None)
self.identity = kwargs.get('identity', None)
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ class ApplicationGateway(Resource):
:param zones: A list of availability zones denoting where the resource
needs to come from.
:type zones: list[str]
:param identity: The identity of the application gateway, if configured.
:type identity:
~azure.mgmt.network.v2018_10_01.models.ManagedServiceIdentity
"""

_validation = {
Expand Down Expand Up @@ -159,9 +162,10 @@ class ApplicationGateway(Resource):
'custom_error_configurations': {'key': 'properties.customErrorConfigurations', 'type': '[ApplicationGatewayCustomError]'},
'etag': {'key': 'etag', 'type': 'str'},
'zones': {'key': 'zones', 'type': '[str]'},
'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'},
}

def __init__(self, *, id: str=None, location: str=None, tags=None, sku=None, ssl_policy=None, gateway_ip_configurations=None, authentication_certificates=None, trusted_root_certificates=None, ssl_certificates=None, frontend_ip_configurations=None, frontend_ports=None, probes=None, backend_address_pools=None, backend_http_settings_collection=None, http_listeners=None, url_path_maps=None, request_routing_rules=None, rewrite_rule_sets=None, redirect_configurations=None, web_application_firewall_configuration=None, enable_http2: bool=None, enable_fips: bool=None, autoscale_configuration=None, resource_guid: str=None, provisioning_state: str=None, custom_error_configurations=None, etag: str=None, zones=None, **kwargs) -> None:
def __init__(self, *, id: str=None, location: str=None, tags=None, sku=None, ssl_policy=None, gateway_ip_configurations=None, authentication_certificates=None, trusted_root_certificates=None, ssl_certificates=None, frontend_ip_configurations=None, frontend_ports=None, probes=None, backend_address_pools=None, backend_http_settings_collection=None, http_listeners=None, url_path_maps=None, request_routing_rules=None, rewrite_rule_sets=None, redirect_configurations=None, web_application_firewall_configuration=None, enable_http2: bool=None, enable_fips: bool=None, autoscale_configuration=None, resource_guid: str=None, provisioning_state: str=None, custom_error_configurations=None, etag: str=None, zones=None, identity=None, **kwargs) -> None:
super(ApplicationGateway, self).__init__(id=id, location=location, tags=tags, **kwargs)
self.sku = sku
self.ssl_policy = ssl_policy
Expand Down Expand Up @@ -189,3 +193,4 @@ def __init__(self, *, id: str=None, location: str=None, tags=None, sku=None, ssl
self.custom_error_configurations = custom_error_configurations
self.etag = etag
self.zones = zones
self.identity = identity
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class ApplicationGatewaySslCertificate(SubResource):
:param public_cert_data: Base-64 encoded Public cert data corresponding to
pfx specified in data. Only applicable in GET request.
:type public_cert_data: str
:param key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx)
'Secret' or 'Certificate' object stored in KeyVault.
:type key_vault_secret_id: str
:param provisioning_state: Provisioning state of the SSL certificate
resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
:type provisioning_state: str
Expand All @@ -44,6 +47,7 @@ class ApplicationGatewaySslCertificate(SubResource):
'data': {'key': 'properties.data', 'type': 'str'},
'password': {'key': 'properties.password', 'type': 'str'},
'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'},
'key_vault_secret_id': {'key': 'properties.keyVaultSecretId', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
Expand All @@ -55,6 +59,7 @@ def __init__(self, **kwargs):
self.data = kwargs.get('data', None)
self.password = kwargs.get('password', None)
self.public_cert_data = kwargs.get('public_cert_data', None)
self.key_vault_secret_id = kwargs.get('key_vault_secret_id', None)
self.provisioning_state = kwargs.get('provisioning_state', None)
self.name = kwargs.get('name', None)
self.etag = kwargs.get('etag', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class ApplicationGatewaySslCertificate(SubResource):
:param public_cert_data: Base-64 encoded Public cert data corresponding to
pfx specified in data. Only applicable in GET request.
:type public_cert_data: str
:param key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx)
'Secret' or 'Certificate' object stored in KeyVault.
:type key_vault_secret_id: str
:param provisioning_state: Provisioning state of the SSL certificate
resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
:type provisioning_state: str
Expand All @@ -44,17 +47,19 @@ class ApplicationGatewaySslCertificate(SubResource):
'data': {'key': 'properties.data', 'type': 'str'},
'password': {'key': 'properties.password', 'type': 'str'},
'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'},
'key_vault_secret_id': {'key': 'properties.keyVaultSecretId', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, id: str=None, data: str=None, password: str=None, public_cert_data: str=None, provisioning_state: str=None, name: str=None, etag: str=None, type: str=None, **kwargs) -> None:
def __init__(self, *, id: str=None, data: str=None, password: str=None, public_cert_data: str=None, key_vault_secret_id: str=None, provisioning_state: str=None, name: str=None, etag: str=None, type: str=None, **kwargs) -> None:
super(ApplicationGatewaySslCertificate, self).__init__(id=id, **kwargs)
self.data = data
self.password = password
self.public_cert_data = public_cert_data
self.key_vault_secret_id = key_vault_secret_id
self.provisioning_state = provisioning_state
self.name = name
self.etag = etag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ class ApplicationGatewayTrustedRootCertificate(SubResource):
:type id: str
:param data: Certificate public data.
:type data: str
:param keyvault_secret_id: KeyVault Secret Id for certificate.
:type keyvault_secret_id: str
:param key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx)
'Secret' or 'Certificate' object stored in KeyVault.
:type key_vault_secret_id: str
:param provisioning_state: Provisioning state of the trusted root
certificate resource. Possible values are: 'Updating', 'Deleting', and
'Failed'.
Expand All @@ -38,7 +39,7 @@ class ApplicationGatewayTrustedRootCertificate(SubResource):
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'data': {'key': 'properties.data', 'type': 'str'},
'keyvault_secret_id': {'key': 'properties.keyvaultSecretId', 'type': 'str'},
'key_vault_secret_id': {'key': 'properties.keyVaultSecretId', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
Expand All @@ -48,7 +49,7 @@ class ApplicationGatewayTrustedRootCertificate(SubResource):
def __init__(self, **kwargs):
super(ApplicationGatewayTrustedRootCertificate, self).__init__(**kwargs)
self.data = kwargs.get('data', None)
self.keyvault_secret_id = kwargs.get('keyvault_secret_id', None)
self.key_vault_secret_id = kwargs.get('key_vault_secret_id', None)
self.provisioning_state = kwargs.get('provisioning_state', None)
self.name = kwargs.get('name', None)
self.etag = kwargs.get('etag', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ class ApplicationGatewayTrustedRootCertificate(SubResource):
:type id: str
:param data: Certificate public data.
:type data: str
:param keyvault_secret_id: KeyVault Secret Id for certificate.
:type keyvault_secret_id: str
:param key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx)
'Secret' or 'Certificate' object stored in KeyVault.
:type key_vault_secret_id: str
:param provisioning_state: Provisioning state of the trusted root
certificate resource. Possible values are: 'Updating', 'Deleting', and
'Failed'.
Expand All @@ -38,17 +39,17 @@ class ApplicationGatewayTrustedRootCertificate(SubResource):
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'data': {'key': 'properties.data', 'type': 'str'},
'keyvault_secret_id': {'key': 'properties.keyvaultSecretId', 'type': 'str'},
'key_vault_secret_id': {'key': 'properties.keyVaultSecretId', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, id: str=None, data: str=None, keyvault_secret_id: str=None, provisioning_state: str=None, name: str=None, etag: str=None, type: str=None, **kwargs) -> None:
def __init__(self, *, id: str=None, data: str=None, key_vault_secret_id: str=None, provisioning_state: str=None, name: str=None, etag: str=None, type: str=None, **kwargs) -> None:
super(ApplicationGatewayTrustedRootCertificate, self).__init__(id=id, **kwargs)
self.data = data
self.keyvault_secret_id = keyvault_secret_id
self.key_vault_secret_id = key_vault_secret_id
self.provisioning_state = provisioning_state
self.name = name
self.etag = etag
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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 ManagedServiceIdentity(Model):
"""Identity for the resource.

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

:ivar principal_id: The principal id of the system assigned identity. This
property will only be provided for a system assigned identity.
:vartype principal_id: str
:ivar tenant_id: The tenant id of the system assigned identity. This
property will only be provided for a system assigned identity.
:vartype tenant_id: str
:param type: The type of identity used for the resource. The type
'SystemAssigned, UserAssigned' includes both an implicitly created
identity and a set of user assigned identities. The type 'None' will
remove any identities from the virtual machine. Possible values include:
'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'
:type type: str or
~azure.mgmt.network.v2018_10_01.models.ResourceIdentityType
:param user_assigned_identities: The list of user identities associated
with resource. The user identity dictionary key references will be ARM
resource ids in the form:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
:type user_assigned_identities: dict[str,
~azure.mgmt.network.v2018_10_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue]
"""

_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
}

_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'type': {'key': 'type', 'type': 'ResourceIdentityType'},
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'},
}

def __init__(self, **kwargs):
super(ManagedServiceIdentity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
self.type = kwargs.get('type', None)
self.user_assigned_identities = kwargs.get('user_assigned_identities', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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 ManagedServiceIdentity(Model):
"""Identity for the resource.

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

:ivar principal_id: The principal id of the system assigned identity. This
property will only be provided for a system assigned identity.
:vartype principal_id: str
:ivar tenant_id: The tenant id of the system assigned identity. This
property will only be provided for a system assigned identity.
:vartype tenant_id: str
:param type: The type of identity used for the resource. The type
'SystemAssigned, UserAssigned' includes both an implicitly created
identity and a set of user assigned identities. The type 'None' will
remove any identities from the virtual machine. Possible values include:
'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'
:type type: str or
~azure.mgmt.network.v2018_10_01.models.ResourceIdentityType
:param user_assigned_identities: The list of user identities associated
with resource. The user identity dictionary key references will be ARM
resource ids in the form:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
:type user_assigned_identities: dict[str,
~azure.mgmt.network.v2018_10_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue]
"""

_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
}

_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'type': {'key': 'type', 'type': 'ResourceIdentityType'},
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'},
}

def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None:
super(ManagedServiceIdentity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
self.type = type
self.user_assigned_identities = user_assigned_identities
Loading