Skip to content

Commit

Permalink
CodeGen from PR 13178 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Hub Generated] Review request for Microsoft.Resources to add version stable/2021-01-01 (Azure#13178)

* Adds base for updating Microsoft.Resources from version stable/2020-10-01 to version 2021-01-01

* Updates readme

* Updates API version in new specs and examples

* Remove deployment scripts for 2021-01-01

* Update what-if definitions

* Fix readme

* Rename a property

* Fix configurations
  • Loading branch information
SDKAuto committed Mar 30, 2021
1 parent 70bf0f0 commit 3aa4fd0
Show file tree
Hide file tree
Showing 113 changed files with 167 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.deployment_scripts = DeploymentScriptsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": true
"client_side_validation": false
},
"global_parameters": {
"sync": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.deployment_scripts = DeploymentScriptsOperations(
Expand Down
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 @@ -50,6 +50,7 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.deployment_scripts = DeploymentScriptsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": true
"client_side_validation": false
},
"global_parameters": {
"sync": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.deployment_scripts = DeploymentScriptsOperations(
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
Loading

0 comments on commit 3aa4fd0

Please sign in to comment.