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

[AutoRelease] t2-policyinsights-2021-12-04-62312 #22005

Merged
merged 2 commits into from
Dec 8, 2021
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
11 changes: 11 additions & 0 deletions sdk/policyinsights/azure-mgmt-policyinsights/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down
2 changes: 1 addition & 1 deletion sdk/policyinsights/azure-mgmt-policyinsights/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -184,6 +186,7 @@
'RemediationDeploymentsListResult',
'RemediationFilters',
'RemediationListResult',
'RemediationPropertiesFailureThreshold',
'Resource',
'SlimPolicyMetadata',
'SummarizeResults',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'},
Expand All @@ -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__(
Expand All @@ -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)
Expand All @@ -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):
Expand Down Expand Up @@ -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.

Expand Down
Loading