From beb2976a175bfb6e7ebd212e1f3e7013a611c405 Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Wed, 8 Dec 2021 09:41:19 +0800 Subject: [PATCH] [AutoRelease] t2-policyinsights-2021-12-04-62312 (#22005) * CodeGen from PR 16250 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.PolicyInsights to add version stable/2021-10-01 (#16250) * Adds base for updating Microsoft.PolicyInsights from version stable/2019-07-01 to version 2021-10-01 * Updates readme * Updates API version in new specs and examples * Microsoft.PolicyInsights/remediations new API version: 2021-10-01 * Add Go tag * Add Java tag * Update specification/policyinsights/resource-manager/readme.md Co-authored-by: Dapeng Zhang * Remove Go SDK generation flag Co-authored-by: Dapeng Zhang * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: Dapeng Zhang Co-authored-by: PythonSdkPipelines --- .../azure-mgmt-policyinsights/CHANGELOG.md | 11 ++++ .../azure-mgmt-policyinsights/_meta.json | 2 +- .../azure/mgmt/policyinsights/_metadata.json | 2 +- .../azure/mgmt/policyinsights/_version.py | 2 +- .../operations/_remediations_operations.py | 48 +++++++-------- .../mgmt/policyinsights/models/__init__.py | 3 + .../mgmt/policyinsights/models/_models.py | 55 +++++++++++++++++ .../mgmt/policyinsights/models/_models_py3.py | 60 +++++++++++++++++++ .../operations/_remediations_operations.py | 48 +++++++-------- 9 files changed, 180 insertions(+), 51 deletions(-) diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/CHANGELOG.md b/sdk/policyinsights/azure-mgmt-policyinsights/CHANGELOG.md index 4501310484cd..608526d8a583 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/CHANGELOG.md +++ b/sdk/policyinsights/azure-mgmt-policyinsights/CHANGELOG.md @@ -1,5 +1,16 @@ # Release History +## 1.1.0b2 (2021-12-04) + +**Features** + + - Model Remediation has a new parameter failure_threshold + - Model Remediation has a new parameter parallel_deployments + - Model Remediation has a new parameter status_message + - Model Remediation has a new parameter system_data + - Model Remediation has a new parameter correlation_id + - Model Remediation has a new parameter resource_count + ## 1.1.0b1 (2021-08-23) **Features** diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/_meta.json b/sdk/policyinsights/azure-mgmt-policyinsights/_meta.json index f9e83a05af21..303d3fa72556 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/_meta.json +++ b/sdk/policyinsights/azure-mgmt-policyinsights/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "e7682aa897902920f3a95b2f358b6f7729d18666", + "commit": "4a2c1e8f277dd11a0da89d56eab8ff1a922d3a69", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/policyinsights/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/policyinsights/resource-manager/readme.md" diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_metadata.json b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_metadata.json index e9fc1e55b97a..418a808d8184 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_metadata.json +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_metadata.json @@ -1,6 +1,6 @@ { "chosen_version": "", - "total_api_version_list": ["2018-07-01-preview", "2019-07-01", "2019-10-01", "2020-07-01", "2021-01-01"], + "total_api_version_list": ["2018-07-01-preview", "2019-10-01", "2020-07-01", "2021-01-01", "2021-10-01"], "client": { "name": "PolicyInsightsClient", "filename": "_policy_insights_client", diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_version.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_version.py index 653b73a4a199..f1fb63697cf5 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_version.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.1.0b1" +VERSION = "1.1.0b2" diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/operations/_remediations_operations.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/operations/_remediations_operations.py index 8b1120d457fd..3979e9042b2e 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/operations/_remediations_operations.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/operations/_remediations_operations.py @@ -71,7 +71,7 @@ def list_deployments_at_management_group( if query_options is not None: _top = query_options.top management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ async def cancel_at_management_group( } error_map.update(kwargs.pop('error_map', {})) management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -215,7 +215,7 @@ def list_for_management_group( _top = query_options.top _filter = query_options.filter management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -297,7 +297,7 @@ async def create_or_update_at_management_group( } error_map.update(kwargs.pop('error_map', {})) management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -366,7 +366,7 @@ async def get_at_management_group( } error_map.update(kwargs.pop('error_map', {})) management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -426,7 +426,7 @@ async def delete_at_management_group( } error_map.update(kwargs.pop('error_map', {})) management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -491,7 +491,7 @@ def list_deployments_at_subscription( _top = None if query_options is not None: _top = query_options.top - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -564,7 +564,7 @@ async def cancel_at_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -625,7 +625,7 @@ def list_for_subscription( if query_options is not None: _top = query_options.top _filter = query_options.filter - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -702,7 +702,7 @@ async def create_or_update_at_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -766,7 +766,7 @@ async def get_at_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -821,7 +821,7 @@ async def delete_at_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -888,7 +888,7 @@ def list_deployments_at_resource_group( _top = None if query_options is not None: _top = query_options.top - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -965,7 +965,7 @@ async def cancel_at_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -1030,7 +1030,7 @@ def list_for_resource_group( if query_options is not None: _top = query_options.top _filter = query_options.filter - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -1111,7 +1111,7 @@ async def create_or_update_at_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1179,7 +1179,7 @@ async def get_at_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -1238,7 +1238,7 @@ async def delete_at_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -1306,7 +1306,7 @@ def list_deployments_at_resource( _top = None if query_options is not None: _top = query_options.top - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -1382,7 +1382,7 @@ async def cancel_at_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -1446,7 +1446,7 @@ def list_for_resource( if query_options is not None: _top = query_options.top _filter = query_options.filter - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -1526,7 +1526,7 @@ async def create_or_update_at_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1593,7 +1593,7 @@ async def get_at_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -1651,7 +1651,7 @@ async def delete_at_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/__init__.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/__init__.py index 00ee9be05f6e..a9874d02f749 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/__init__.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/__init__.py @@ -57,6 +57,7 @@ from ._models_py3 import RemediationDeploymentsListResult from ._models_py3 import RemediationFilters from ._models_py3 import RemediationListResult + from ._models_py3 import RemediationPropertiesFailureThreshold from ._models_py3 import Resource from ._models_py3 import SlimPolicyMetadata from ._models_py3 import SummarizeResults @@ -116,6 +117,7 @@ from ._models import RemediationDeploymentsListResult # type: ignore from ._models import RemediationFilters # type: ignore from ._models import RemediationListResult # type: ignore + from ._models import RemediationPropertiesFailureThreshold # type: ignore from ._models import Resource # type: ignore from ._models import SlimPolicyMetadata # type: ignore from ._models import SummarizeResults # type: ignore @@ -184,6 +186,7 @@ 'RemediationDeploymentsListResult', 'RemediationFilters', 'RemediationListResult', + 'RemediationPropertiesFailureThreshold', 'Resource', 'SlimPolicyMetadata', 'SummarizeResults', diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models.py index 6d0131209fa1..77670f3e4f05 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models.py @@ -1925,6 +1925,9 @@ class Remediation(msrest.serialization.Model): :vartype type: str :ivar name: The name of the remediation. :vartype name: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.policyinsights.models.SystemData :param policy_assignment_id: The resource ID of the policy assignment that should be remediated. :type policy_assignment_id: str @@ -1947,22 +1950,42 @@ class Remediation(msrest.serialization.Model): :ivar deployment_status: The deployment status summary for all deployments created by the remediation. :vartype deployment_status: ~azure.mgmt.policyinsights.models.RemediationDeploymentSummary + :ivar status_message: The remediation status message. Provides additional details regarding the + state of the remediation. + :vartype status_message: str + :ivar correlation_id: The remediation correlation Id. Can be used to find events related to the + remediation in the activity log. + :vartype correlation_id: str + :param resource_count: Determines the max number of resources that can be remediated by the + remediation job. If not provided, the default resource count is used. + :type resource_count: int + :param parallel_deployments: Determines how many resources to remediate at any given time. Can + be used to increase or reduce the pace of the remediation. If not provided, the default + parallel deployments value is used. + :type parallel_deployments: int + :param failure_threshold: The remediation failure threshold settings. + :type failure_threshold: + ~azure.mgmt.policyinsights.models.RemediationPropertiesFailureThreshold """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'created_on': {'readonly': True}, 'last_updated_on': {'readonly': True}, 'deployment_status': {'readonly': True}, + 'status_message': {'readonly': True}, + 'correlation_id': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'policy_assignment_id': {'key': 'properties.policyAssignmentId', 'type': 'str'}, 'policy_definition_reference_id': {'key': 'properties.policyDefinitionReferenceId', 'type': 'str'}, 'resource_discovery_mode': {'key': 'properties.resourceDiscoveryMode', 'type': 'str'}, @@ -1971,6 +1994,11 @@ class Remediation(msrest.serialization.Model): 'last_updated_on': {'key': 'properties.lastUpdatedOn', 'type': 'iso-8601'}, 'filters': {'key': 'properties.filters', 'type': 'RemediationFilters'}, 'deployment_status': {'key': 'properties.deploymentStatus', 'type': 'RemediationDeploymentSummary'}, + 'status_message': {'key': 'properties.statusMessage', 'type': 'str'}, + 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, + 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, + 'parallel_deployments': {'key': 'properties.parallelDeployments', 'type': 'int'}, + 'failure_threshold': {'key': 'properties.failureThreshold', 'type': 'RemediationPropertiesFailureThreshold'}, } def __init__( @@ -1981,6 +2009,7 @@ def __init__( self.id = None self.type = None self.name = None + self.system_data = None self.policy_assignment_id = kwargs.get('policy_assignment_id', None) self.policy_definition_reference_id = kwargs.get('policy_definition_reference_id', None) self.resource_discovery_mode = kwargs.get('resource_discovery_mode', None) @@ -1989,6 +2018,11 @@ def __init__( self.last_updated_on = None self.filters = kwargs.get('filters', None) self.deployment_status = None + self.status_message = None + self.correlation_id = None + self.resource_count = kwargs.get('resource_count', None) + self.parallel_deployments = kwargs.get('parallel_deployments', None) + self.failure_threshold = kwargs.get('failure_threshold', None) class RemediationDeployment(msrest.serialization.Model): @@ -2163,6 +2197,27 @@ def __init__( self.next_link = None +class RemediationPropertiesFailureThreshold(msrest.serialization.Model): + """The remediation failure threshold settings. + + :param percentage: A number between 0.0 to 1.0 representing the percentage failure threshold. + The remediation will fail if the percentage of failed remediation operations (i.e. failed + deployments) exceeds this threshold. + :type percentage: float + """ + + _attribute_map = { + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(RemediationPropertiesFailureThreshold, self).__init__(**kwargs) + self.percentage = kwargs.get('percentage', None) + + class SlimPolicyMetadata(msrest.serialization.Model): """Slim version of policy metadata resource definition, excluding properties with large strings. diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models_py3.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models_py3.py index 4d05c6b521cc..44be9e043bfc 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models_py3.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/models/_models_py3.py @@ -2107,6 +2107,9 @@ class Remediation(msrest.serialization.Model): :vartype type: str :ivar name: The name of the remediation. :vartype name: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.policyinsights.models.SystemData :param policy_assignment_id: The resource ID of the policy assignment that should be remediated. :type policy_assignment_id: str @@ -2129,22 +2132,42 @@ class Remediation(msrest.serialization.Model): :ivar deployment_status: The deployment status summary for all deployments created by the remediation. :vartype deployment_status: ~azure.mgmt.policyinsights.models.RemediationDeploymentSummary + :ivar status_message: The remediation status message. Provides additional details regarding the + state of the remediation. + :vartype status_message: str + :ivar correlation_id: The remediation correlation Id. Can be used to find events related to the + remediation in the activity log. + :vartype correlation_id: str + :param resource_count: Determines the max number of resources that can be remediated by the + remediation job. If not provided, the default resource count is used. + :type resource_count: int + :param parallel_deployments: Determines how many resources to remediate at any given time. Can + be used to increase or reduce the pace of the remediation. If not provided, the default + parallel deployments value is used. + :type parallel_deployments: int + :param failure_threshold: The remediation failure threshold settings. + :type failure_threshold: + ~azure.mgmt.policyinsights.models.RemediationPropertiesFailureThreshold """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'created_on': {'readonly': True}, 'last_updated_on': {'readonly': True}, 'deployment_status': {'readonly': True}, + 'status_message': {'readonly': True}, + 'correlation_id': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'policy_assignment_id': {'key': 'properties.policyAssignmentId', 'type': 'str'}, 'policy_definition_reference_id': {'key': 'properties.policyDefinitionReferenceId', 'type': 'str'}, 'resource_discovery_mode': {'key': 'properties.resourceDiscoveryMode', 'type': 'str'}, @@ -2153,6 +2176,11 @@ class Remediation(msrest.serialization.Model): 'last_updated_on': {'key': 'properties.lastUpdatedOn', 'type': 'iso-8601'}, 'filters': {'key': 'properties.filters', 'type': 'RemediationFilters'}, 'deployment_status': {'key': 'properties.deploymentStatus', 'type': 'RemediationDeploymentSummary'}, + 'status_message': {'key': 'properties.statusMessage', 'type': 'str'}, + 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, + 'resource_count': {'key': 'properties.resourceCount', 'type': 'int'}, + 'parallel_deployments': {'key': 'properties.parallelDeployments', 'type': 'int'}, + 'failure_threshold': {'key': 'properties.failureThreshold', 'type': 'RemediationPropertiesFailureThreshold'}, } def __init__( @@ -2162,12 +2190,16 @@ def __init__( policy_definition_reference_id: Optional[str] = None, resource_discovery_mode: Optional[Union[str, "ResourceDiscoveryMode"]] = None, filters: Optional["RemediationFilters"] = None, + resource_count: Optional[int] = None, + parallel_deployments: Optional[int] = None, + failure_threshold: Optional["RemediationPropertiesFailureThreshold"] = None, **kwargs ): super(Remediation, self).__init__(**kwargs) self.id = None self.type = None self.name = None + self.system_data = None self.policy_assignment_id = policy_assignment_id self.policy_definition_reference_id = policy_definition_reference_id self.resource_discovery_mode = resource_discovery_mode @@ -2176,6 +2208,11 @@ def __init__( self.last_updated_on = None self.filters = filters self.deployment_status = None + self.status_message = None + self.correlation_id = None + self.resource_count = resource_count + self.parallel_deployments = parallel_deployments + self.failure_threshold = failure_threshold class RemediationDeployment(msrest.serialization.Model): @@ -2352,6 +2389,29 @@ def __init__( self.next_link = None +class RemediationPropertiesFailureThreshold(msrest.serialization.Model): + """The remediation failure threshold settings. + + :param percentage: A number between 0.0 to 1.0 representing the percentage failure threshold. + The remediation will fail if the percentage of failed remediation operations (i.e. failed + deployments) exceeds this threshold. + :type percentage: float + """ + + _attribute_map = { + 'percentage': {'key': 'percentage', 'type': 'float'}, + } + + def __init__( + self, + *, + percentage: Optional[float] = None, + **kwargs + ): + super(RemediationPropertiesFailureThreshold, self).__init__(**kwargs) + self.percentage = percentage + + class SlimPolicyMetadata(msrest.serialization.Model): """Slim version of policy metadata resource definition, excluding properties with large strings. diff --git a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_remediations_operations.py b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_remediations_operations.py index 676ce826e123..6535a60b01bb 100644 --- a/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_remediations_operations.py +++ b/sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/_remediations_operations.py @@ -76,7 +76,7 @@ def list_deployments_at_management_group( if query_options is not None: _top = query_options.top management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -155,7 +155,7 @@ def cancel_at_management_group( } error_map.update(kwargs.pop('error_map', {})) management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -222,7 +222,7 @@ def list_for_management_group( _top = query_options.top _filter = query_options.filter management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -305,7 +305,7 @@ def create_or_update_at_management_group( } error_map.update(kwargs.pop('error_map', {})) management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -375,7 +375,7 @@ def get_at_management_group( } error_map.update(kwargs.pop('error_map', {})) management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -436,7 +436,7 @@ def delete_at_management_group( } error_map.update(kwargs.pop('error_map', {})) management_groups_namespace = "Microsoft.Management" - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -502,7 +502,7 @@ def list_deployments_at_subscription( _top = None if query_options is not None: _top = query_options.top - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -576,7 +576,7 @@ def cancel_at_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -638,7 +638,7 @@ def list_for_subscription( if query_options is not None: _top = query_options.top _filter = query_options.filter - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -716,7 +716,7 @@ def create_or_update_at_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -781,7 +781,7 @@ def get_at_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -837,7 +837,7 @@ def delete_at_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -905,7 +905,7 @@ def list_deployments_at_resource_group( _top = None if query_options is not None: _top = query_options.top - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -983,7 +983,7 @@ def cancel_at_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -1049,7 +1049,7 @@ def list_for_resource_group( if query_options is not None: _top = query_options.top _filter = query_options.filter - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -1131,7 +1131,7 @@ def create_or_update_at_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1200,7 +1200,7 @@ def get_at_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -1260,7 +1260,7 @@ def delete_at_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -1329,7 +1329,7 @@ def list_deployments_at_resource( _top = None if query_options is not None: _top = query_options.top - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -1406,7 +1406,7 @@ def cancel_at_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -1471,7 +1471,7 @@ def list_for_resource( if query_options is not None: _top = query_options.top _filter = query_options.filter - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -1552,7 +1552,7 @@ def create_or_update_at_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1620,7 +1620,7 @@ def get_at_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -1679,7 +1679,7 @@ def delete_at_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-07-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL