Skip to content

Commit 6ba72b8

Browse files
Azure CLI BotSDKAutoRAY-316
authored andcommitted
[AutoRelease] t2-policyinsights-2021-08-23-78735 (#20381)
* CodeGen from PR 15165 in Azure/azure-rest-api-specs [policyinsights] Fix next_link (#15165) * fix next_link * directive * Update readme.nodejs.md * js directvie * Update readme.md * supress other language * Update readme.go.md * swagger lint * swagger lint * swagger lint * Update readme.md * version,CHANGELOG Co-authored-by: SDKAuto <[email protected]> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Zed Lei <[email protected]>
1 parent a405542 commit 6ba72b8

31 files changed

+3424
-292
lines changed

sdk/policyinsights/azure-mgmt-policyinsights/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 1.1.0b1 (2021-08-23)
4+
5+
**Features**
6+
7+
- Added operation group AttestationsOperations
8+
39
## 1.0.0 (2020-12-22)
410

511
**Features**

sdk/policyinsights/azure-mgmt-policyinsights/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "e7682aa897902920f3a95b2f358b6f7729d18666",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"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/[email protected] --use=@autorest/[email protected] --version=3.4.5",
10+
"readme": "specification/policyinsights/resource-manager/readme.md"
11+
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"chosen_version": "",
3+
"total_api_version_list": ["2018-07-01-preview", "2019-07-01", "2019-10-01", "2020-07-01", "2021-01-01"],
4+
"client": {
5+
"name": "PolicyInsightsClient",
6+
"filename": "_policy_insights_client",
7+
"description": "PolicyInsightsClient.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": true,
12+
"client_side_validation": false,
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"PolicyInsightsClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"PolicyInsightsClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
},
24+
"subscription_id": {
25+
"signature": "subscription_id, # type: str",
26+
"description": "Microsoft Azure subscription ID.",
27+
"docstring_type": "str",
28+
"required": true
29+
}
30+
},
31+
"async": {
32+
"credential": {
33+
"signature": "credential: \"AsyncTokenCredential\",",
34+
"description": "Credential needed for the client to connect to Azure.",
35+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
36+
"required": true
37+
},
38+
"subscription_id": {
39+
"signature": "subscription_id: str,",
40+
"description": "Microsoft Azure subscription ID.",
41+
"docstring_type": "str",
42+
"required": true
43+
}
44+
},
45+
"constant": {
46+
},
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
90+
},
91+
"config": {
92+
"credential": true,
93+
"credential_scopes": ["https://management.azure.com/.default"],
94+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
95+
"credential_default_policy_type_has_async_version": true,
96+
"credential_key_header_name": null,
97+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
98+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
99+
},
100+
"operation_groups": {
101+
"policy_tracked_resources": "PolicyTrackedResourcesOperations",
102+
"remediations": "RemediationsOperations",
103+
"policy_events": "PolicyEventsOperations",
104+
"policy_states": "PolicyStatesOperations",
105+
"operations": "Operations",
106+
"policy_metadata": "PolicyMetadataOperations",
107+
"policy_restrictions": "PolicyRestrictionsOperations",
108+
"attestations": "AttestationsOperations"
109+
}
110+
}

sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_policy_insights_client.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import PolicyInsightsClientConfiguration
2122
from .operations import PolicyTrackedResourcesOperations
@@ -25,6 +26,7 @@
2526
from .operations import Operations
2627
from .operations import PolicyMetadataOperations
2728
from .operations import PolicyRestrictionsOperations
29+
from .operations import AttestationsOperations
2830
from . import models
2931

3032

@@ -45,6 +47,8 @@ class PolicyInsightsClient(object):
4547
:vartype policy_metadata: azure.mgmt.policyinsights.operations.PolicyMetadataOperations
4648
:ivar policy_restrictions: PolicyRestrictionsOperations operations
4749
:vartype policy_restrictions: azure.mgmt.policyinsights.operations.PolicyRestrictionsOperations
50+
:ivar attestations: AttestationsOperations operations
51+
:vartype attestations: azure.mgmt.policyinsights.operations.AttestationsOperations
4852
:param credential: Credential needed for the client to connect to Azure.
4953
:type credential: ~azure.core.credentials.TokenCredential
5054
:param subscription_id: Microsoft Azure subscription ID.
@@ -85,6 +89,26 @@ def __init__(
8589
self._client, self._config, self._serialize, self._deserialize)
8690
self.policy_restrictions = PolicyRestrictionsOperations(
8791
self._client, self._config, self._serialize, self._deserialize)
92+
self.attestations = AttestationsOperations(
93+
self._client, self._config, self._serialize, self._deserialize)
94+
95+
def _send_request(self, http_request, **kwargs):
96+
# type: (HttpRequest, Any) -> HttpResponse
97+
"""Runs the network request through the client's chained policies.
98+
99+
:param http_request: The network request you want to make. Required.
100+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
101+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
102+
:return: The response of your network call. Does not do error handling on your response.
103+
:rtype: ~azure.core.pipeline.transport.HttpResponse
104+
"""
105+
path_format_arguments = {
106+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
107+
}
108+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
109+
stream = kwargs.pop("stream", True)
110+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
111+
return pipeline_response.http_response
88112

89113
def close(self):
90114
# type: () -> None

sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0"
9+
VERSION = "1.1.0b1"

sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/_policy_insights_client.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -23,6 +24,7 @@
2324
from .operations import Operations
2425
from .operations import PolicyMetadataOperations
2526
from .operations import PolicyRestrictionsOperations
27+
from .operations import AttestationsOperations
2628
from .. import models
2729

2830

@@ -43,6 +45,8 @@ class PolicyInsightsClient(object):
4345
:vartype policy_metadata: azure.mgmt.policyinsights.aio.operations.PolicyMetadataOperations
4446
:ivar policy_restrictions: PolicyRestrictionsOperations operations
4547
:vartype policy_restrictions: azure.mgmt.policyinsights.aio.operations.PolicyRestrictionsOperations
48+
:ivar attestations: AttestationsOperations operations
49+
:vartype attestations: azure.mgmt.policyinsights.aio.operations.AttestationsOperations
4650
:param credential: Credential needed for the client to connect to Azure.
4751
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
4852
:param subscription_id: Microsoft Azure subscription ID.
@@ -82,6 +86,25 @@ def __init__(
8286
self._client, self._config, self._serialize, self._deserialize)
8387
self.policy_restrictions = PolicyRestrictionsOperations(
8488
self._client, self._config, self._serialize, self._deserialize)
89+
self.attestations = AttestationsOperations(
90+
self._client, self._config, self._serialize, self._deserialize)
91+
92+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
93+
"""Runs the network request through the client's chained policies.
94+
95+
:param http_request: The network request you want to make. Required.
96+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
97+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
98+
:return: The response of your network call. Does not do error handling on your response.
99+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
100+
"""
101+
path_format_arguments = {
102+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
103+
}
104+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
105+
stream = kwargs.pop("stream", True)
106+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
107+
return pipeline_response.http_response
85108

86109
async def close(self) -> None:
87110
await self._client.close()

sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/aio/operations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from ._operations import Operations
1414
from ._policy_metadata_operations import PolicyMetadataOperations
1515
from ._policy_restrictions_operations import PolicyRestrictionsOperations
16+
from ._attestations_operations import AttestationsOperations
1617

1718
__all__ = [
1819
'PolicyTrackedResourcesOperations',
@@ -22,4 +23,5 @@
2223
'Operations',
2324
'PolicyMetadataOperations',
2425
'PolicyRestrictionsOperations',
26+
'AttestationsOperations',
2527
]

0 commit comments

Comments
 (0)