Skip to content

Commit

Permalink
CodeGen from PR 13120 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Fix swagger KPI issue on additional property "tenantId" in deployment script with api-version 2020-10-01 (Azure#13120)

* Update deploymentScripts.json

Mark environment variable secureValue as secret

* Update deploymentScripts.json

Fix a bug in Microsoft.Resources/deploymentScripts where tenantId property is missed from ManagedServiceIdentity.

* Fix swagger KPI issue on additional property "tenantId" in deployment script with api-version 2020-10-01

* Update deploymentScripts.json

* update retentionInterval description.
  • Loading branch information
SDKAuto committed Mar 2, 2021
1 parent 2d32ffe commit d8d317d
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class AzureCliScript(DeploymentScript):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -276,7 +276,7 @@ class ScriptConfigurationBase(msrest.serialization.Model):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -393,7 +393,7 @@ class AzureCliScriptProperties(DeploymentScriptPropertiesBase, ScriptConfigurati
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -537,7 +537,7 @@ class AzurePowerShellScript(DeploymentScript):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -635,7 +635,7 @@ class AzurePowerShellScriptProperties(DeploymentScriptPropertiesBase, ScriptConf
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -945,17 +945,23 @@ def __init__(
class ManagedServiceIdentity(msrest.serialization.Model):
"""Managed identity generic object.
Variables are only populated by the server, and will be ignored when sending a request.
:param type: Type of the managed identity. Possible values include: "UserAssigned".
:type type: str or
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.ManagedServiceIdentityType
:param tenant_id: ID of the Azure Active Directory.
:type tenant_id: str
:ivar tenant_id: ID of the Azure Active Directory.
:vartype tenant_id: str
:param user_assigned_identities: The list of user-assigned managed identities associated with
the resource. Key is the Azure resource Id of the managed identity.
:type user_assigned_identities: dict[str,
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.UserAssignedIdentity]
"""

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

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
Expand All @@ -968,7 +974,7 @@ def __init__(
):
super(ManagedServiceIdentity, self).__init__(**kwargs)
self.type = kwargs.get('type', None)
self.tenant_id = kwargs.get('tenant_id', None)
self.tenant_id = None
self.user_assigned_identities = kwargs.get('user_assigned_identities', None)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class AzureCliScript(DeploymentScript):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -301,7 +301,7 @@ class ScriptConfigurationBase(msrest.serialization.Model):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -431,7 +431,7 @@ class AzureCliScriptProperties(DeploymentScriptPropertiesBase, ScriptConfigurati
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -588,7 +588,7 @@ class AzurePowerShellScript(DeploymentScript):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -702,7 +702,7 @@ class AzurePowerShellScriptProperties(DeploymentScriptPropertiesBase, ScriptConf
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -1037,17 +1037,23 @@ def __init__(
class ManagedServiceIdentity(msrest.serialization.Model):
"""Managed identity generic object.
Variables are only populated by the server, and will be ignored when sending a request.
:param type: Type of the managed identity. Possible values include: "UserAssigned".
:type type: str or
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.ManagedServiceIdentityType
:param tenant_id: ID of the Azure Active Directory.
:type tenant_id: str
:ivar tenant_id: ID of the Azure Active Directory.
:vartype tenant_id: str
:param user_assigned_identities: The list of user-assigned managed identities associated with
the resource. Key is the Azure resource Id of the managed identity.
:type user_assigned_identities: dict[str,
~azure.mgmt.resource.deploymentscripts.v2019_10_01_preview.models.UserAssignedIdentity]
"""

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

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
Expand All @@ -1058,13 +1064,12 @@ def __init__(
self,
*,
type: Optional[Union[str, "ManagedServiceIdentityType"]] = None,
tenant_id: Optional[str] = None,
user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None,
**kwargs
):
super(ManagedServiceIdentity, self).__init__(**kwargs)
self.type = type
self.tenant_id = tenant_id
self.tenant_id = None
self.user_assigned_identities = user_assigned_identities


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class AzureCliScript(DeploymentScript):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -272,7 +272,7 @@ class ScriptConfigurationBase(msrest.serialization.Model):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -389,7 +389,7 @@ class AzureCliScriptProperties(DeploymentScriptPropertiesBase, ScriptConfigurati
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -532,7 +532,7 @@ class AzurePowerShellScript(DeploymentScript):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -629,7 +629,7 @@ class AzurePowerShellScriptProperties(DeploymentScriptPropertiesBase, ScriptConf
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -937,17 +937,26 @@ def __init__(
class ManagedServiceIdentity(msrest.serialization.Model):
"""Managed identity generic object.
Variables are only populated by the server, and will be ignored when sending a request.
:param type: Type of the managed identity. Possible values include: "UserAssigned".
:type type: str or
~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ManagedServiceIdentityType
:ivar tenant_id: ID of the Azure Active Directory.
:vartype tenant_id: str
:param user_assigned_identities: The list of user-assigned managed identities associated with
the resource. Key is the Azure resource Id of the managed identity.
:type user_assigned_identities: dict[str,
~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.UserAssignedIdentity]
"""

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

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'},
}

Expand All @@ -957,6 +966,7 @@ def __init__(
):
super(ManagedServiceIdentity, self).__init__(**kwargs)
self.type = kwargs.get('type', None)
self.tenant_id = None
self.user_assigned_identities = kwargs.get('user_assigned_identities', None)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class AzureCliScript(DeploymentScript):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -297,7 +297,7 @@ class ScriptConfigurationBase(msrest.serialization.Model):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -427,7 +427,7 @@ class AzureCliScriptProperties(DeploymentScriptPropertiesBase, ScriptConfigurati
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -583,7 +583,7 @@ class AzurePowerShellScript(DeploymentScript):
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -696,7 +696,7 @@ class AzurePowerShellScriptProperties(DeploymentScriptPropertiesBase, ScriptConf
:type force_update_tag: str
:param retention_interval: Required. Interval for which the service retains the script resource
after it reaches a terminal state. Resource will be deleted when this duration expires.
Duration is based on ISO 8601 pattern (for example P7D means one week).
Duration is based on ISO 8601 pattern (for example P1D means one day).
:type retention_interval: ~datetime.timedelta
:param timeout: Maximum allowed script execution time specified in ISO 8601 format. Default
value is P1D.
Expand Down Expand Up @@ -1029,17 +1029,26 @@ def __init__(
class ManagedServiceIdentity(msrest.serialization.Model):
"""Managed identity generic object.
Variables are only populated by the server, and will be ignored when sending a request.
:param type: Type of the managed identity. Possible values include: "UserAssigned".
:type type: str or
~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.ManagedServiceIdentityType
:ivar tenant_id: ID of the Azure Active Directory.
:vartype tenant_id: str
:param user_assigned_identities: The list of user-assigned managed identities associated with
the resource. Key is the Azure resource Id of the managed identity.
:type user_assigned_identities: dict[str,
~azure.mgmt.resource.deploymentscripts.v2020_10_01.models.UserAssignedIdentity]
"""

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

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'},
}

Expand All @@ -1052,6 +1061,7 @@ def __init__(
):
super(ManagedServiceIdentity, self).__init__(**kwargs)
self.type = type
self.tenant_id = None
self.user_assigned_identities = user_assigned_identities


Expand Down

0 comments on commit d8d317d

Please sign in to comment.