Skip to content

Commit 9e1fa59

Browse files
author
SDKAuto
committed
CodeGen from PR 34270 in Azure/azure-rest-api-specs
Merge 447c4193246efcde66d0d0feaa59da2c756c794f into a19648565889eaae019e531c15f3045d1244c7ce
1 parent 6c30600 commit 9e1fa59

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+783
-663
lines changed

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

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

3+
## 1.0.0b2 (2025-05-13)
4+
5+
### Features Added
6+
7+
- Model `Certificate` added property `enhanced_key_usage`
8+
- Added model `AccountSkuPatch`
9+
- Method `Certificate.__init__` has a new overload `def __init__(self: None, serial_number: Optional[str], enhanced_key_usage: Optional[str], subject_name: Optional[str], thumbprint: Optional[str], created_date: Optional[str], expiry_date: Optional[str], status: Optional[Union[str, _models.CertificateStatus]], revocation: Optional[_models.Revocation])`
10+
- Method `CertificateProfileProperties.__init__` has a new overload `def __init__(self: None, profile_type: Union[str, _models.ProfileType], identity_validation_id: str, include_street_address: Optional[bool], include_city: Optional[bool], include_state: Optional[bool], include_country: Optional[bool], include_postal_code: Optional[bool])`
11+
- Method `CodeSigningAccountPatchProperties.__init__` has a new overload `def __init__(self: None, sku: Optional[_models.AccountSkuPatch])`
12+
- Method `Operation.__init__` has a new overload `def __init__(self: None, display: Optional[_models.OperationDisplay])`
13+
- Method `AccountSkuPatch.__init__` has a new overload `def __init__(self: None, name: Optional[Union[str, _models.SkuName]])`
14+
- Method `AccountSkuPatch.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
15+
16+
### Breaking Changes
17+
18+
- Model `CertificateProfileProperties` deleted or renamed its instance variable `common_name`
19+
- Model `CertificateProfileProperties` deleted or renamed its instance variable `organization`
20+
- Model `CertificateProfileProperties` deleted or renamed its instance variable `organization_unit`
21+
- Model `CertificateProfileProperties` deleted or renamed its instance variable `street_address`
22+
- Model `CertificateProfileProperties` deleted or renamed its instance variable `city`
23+
- Model `CertificateProfileProperties` deleted or renamed its instance variable `state`
24+
- Model `CertificateProfileProperties` deleted or renamed its instance variable `country`
25+
- Model `CertificateProfileProperties` deleted or renamed its instance variable `postal_code`
26+
- Model `CertificateProfileProperties` deleted or renamed its instance variable `enhanced_key_usage`
27+
328
## 1.0.0b1 (2024-09-27)
429

530
### Other Changes

sdk/trustedsigning/azure-mgmt-trustedsigning/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Trustedsigning Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "e6fde2ac19d0202f0e72217a3e0f9edb63dba273",
2+
"commit": "5ab69662eff4ee3c2bc93c2a4959470ab9867c99",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/codesigning/CodeSigning.Management",
5-
"@azure-tools/typespec-python": "0.33.0"
5+
"@azure-tools/typespec-python": "0.44.2"
66
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.CodeSigning",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.trustedsigning.models.AccountSku": "Microsoft.CodeSigning.AccountSku",
5+
"azure.mgmt.trustedsigning.models.AccountSkuPatch": "Microsoft.CodeSigning.AccountSkuPatch",
6+
"azure.mgmt.trustedsigning.models.Certificate": "Microsoft.CodeSigning.Certificate",
7+
"azure.mgmt.trustedsigning.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
8+
"azure.mgmt.trustedsigning.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource",
9+
"azure.mgmt.trustedsigning.models.CertificateProfile": "Microsoft.CodeSigning.CertificateProfile",
10+
"azure.mgmt.trustedsigning.models.CertificateProfileProperties": "Microsoft.CodeSigning.CertificateProfileProperties",
11+
"azure.mgmt.trustedsigning.models.CheckNameAvailability": "Microsoft.CodeSigning.CheckNameAvailability",
12+
"azure.mgmt.trustedsigning.models.CheckNameAvailabilityResult": "Microsoft.CodeSigning.CheckNameAvailabilityResult",
13+
"azure.mgmt.trustedsigning.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
14+
"azure.mgmt.trustedsigning.models.CodeSigningAccount": "Microsoft.CodeSigning.CodeSigningAccount",
15+
"azure.mgmt.trustedsigning.models.CodeSigningAccountPatch": "Microsoft.CodeSigning.CodeSigningAccountPatch",
16+
"azure.mgmt.trustedsigning.models.CodeSigningAccountPatchProperties": "Microsoft.CodeSigning.CodeSigningAccountPatchProperties",
17+
"azure.mgmt.trustedsigning.models.CodeSigningAccountProperties": "Microsoft.CodeSigning.CodeSigningAccountProperties",
18+
"azure.mgmt.trustedsigning.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
19+
"azure.mgmt.trustedsigning.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
20+
"azure.mgmt.trustedsigning.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
21+
"azure.mgmt.trustedsigning.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
22+
"azure.mgmt.trustedsigning.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
23+
"azure.mgmt.trustedsigning.models.Revocation": "Microsoft.CodeSigning.Revocation",
24+
"azure.mgmt.trustedsigning.models.RevokeCertificate": "Microsoft.CodeSigning.RevokeCertificate",
25+
"azure.mgmt.trustedsigning.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
26+
"azure.mgmt.trustedsigning.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
27+
"azure.mgmt.trustedsigning.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
28+
"azure.mgmt.trustedsigning.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
29+
"azure.mgmt.trustedsigning.models.SkuName": "Microsoft.CodeSigning.SkuName",
30+
"azure.mgmt.trustedsigning.models.ProvisioningState": "Microsoft.CodeSigning.ProvisioningState",
31+
"azure.mgmt.trustedsigning.models.NameUnavailabilityReason": "Microsoft.CodeSigning.NameUnavailabilityReason",
32+
"azure.mgmt.trustedsigning.models.ProfileType": "Microsoft.CodeSigning.ProfileType",
33+
"azure.mgmt.trustedsigning.models.CertificateProfileStatus": "Microsoft.CodeSigning.CertificateProfileStatus",
34+
"azure.mgmt.trustedsigning.models.CertificateStatus": "Microsoft.CodeSigning.CertificateStatus",
35+
"azure.mgmt.trustedsigning.models.RevocationStatus": "Microsoft.CodeSigning.RevocationStatus",
36+
"azure.mgmt.trustedsigning.operations.Operations.list": "Azure.ResourceManager.Operations.list",
37+
"azure.mgmt.trustedsigning.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list",
38+
"azure.mgmt.trustedsigning.operations.CodeSigningAccountsOperations.get": "Microsoft.CodeSigning.CodeSigningAccounts.get",
39+
"azure.mgmt.trustedsigning.aio.operations.CodeSigningAccountsOperations.get": "Microsoft.CodeSigning.CodeSigningAccounts.get",
40+
"azure.mgmt.trustedsigning.operations.CodeSigningAccountsOperations.begin_create": "Microsoft.CodeSigning.CodeSigningAccounts.create",
41+
"azure.mgmt.trustedsigning.aio.operations.CodeSigningAccountsOperations.begin_create": "Microsoft.CodeSigning.CodeSigningAccounts.create",
42+
"azure.mgmt.trustedsigning.operations.CodeSigningAccountsOperations.begin_update": "Microsoft.CodeSigning.CodeSigningAccounts.update",
43+
"azure.mgmt.trustedsigning.aio.operations.CodeSigningAccountsOperations.begin_update": "Microsoft.CodeSigning.CodeSigningAccounts.update",
44+
"azure.mgmt.trustedsigning.operations.CodeSigningAccountsOperations.begin_delete": "Microsoft.CodeSigning.CodeSigningAccounts.delete",
45+
"azure.mgmt.trustedsigning.aio.operations.CodeSigningAccountsOperations.begin_delete": "Microsoft.CodeSigning.CodeSigningAccounts.delete",
46+
"azure.mgmt.trustedsigning.operations.CodeSigningAccountsOperations.list_by_resource_group": "Microsoft.CodeSigning.CodeSigningAccounts.listByResourceGroup",
47+
"azure.mgmt.trustedsigning.aio.operations.CodeSigningAccountsOperations.list_by_resource_group": "Microsoft.CodeSigning.CodeSigningAccounts.listByResourceGroup",
48+
"azure.mgmt.trustedsigning.operations.CodeSigningAccountsOperations.list_by_subscription": "Microsoft.CodeSigning.CodeSigningAccounts.listBySubscription",
49+
"azure.mgmt.trustedsigning.aio.operations.CodeSigningAccountsOperations.list_by_subscription": "Microsoft.CodeSigning.CodeSigningAccounts.listBySubscription",
50+
"azure.mgmt.trustedsigning.operations.CodeSigningAccountsOperations.check_name_availability": "Microsoft.CodeSigning.CodeSigningAccounts.checkNameAvailability",
51+
"azure.mgmt.trustedsigning.aio.operations.CodeSigningAccountsOperations.check_name_availability": "Microsoft.CodeSigning.CodeSigningAccounts.checkNameAvailability",
52+
"azure.mgmt.trustedsigning.operations.CertificateProfilesOperations.get": "Microsoft.CodeSigning.CertificateProfiles.get",
53+
"azure.mgmt.trustedsigning.aio.operations.CertificateProfilesOperations.get": "Microsoft.CodeSigning.CertificateProfiles.get",
54+
"azure.mgmt.trustedsigning.operations.CertificateProfilesOperations.begin_create": "Microsoft.CodeSigning.CertificateProfiles.create",
55+
"azure.mgmt.trustedsigning.aio.operations.CertificateProfilesOperations.begin_create": "Microsoft.CodeSigning.CertificateProfiles.create",
56+
"azure.mgmt.trustedsigning.operations.CertificateProfilesOperations.begin_delete": "Microsoft.CodeSigning.CertificateProfiles.delete",
57+
"azure.mgmt.trustedsigning.aio.operations.CertificateProfilesOperations.begin_delete": "Microsoft.CodeSigning.CertificateProfiles.delete",
58+
"azure.mgmt.trustedsigning.operations.CertificateProfilesOperations.list_by_code_signing_account": "Microsoft.CodeSigning.CertificateProfiles.listByCodeSigningAccount",
59+
"azure.mgmt.trustedsigning.aio.operations.CertificateProfilesOperations.list_by_code_signing_account": "Microsoft.CodeSigning.CertificateProfiles.listByCodeSigningAccount",
60+
"azure.mgmt.trustedsigning.operations.CertificateProfilesOperations.revoke_certificate": "Microsoft.CodeSigning.CertificateProfiles.revokeCertificate",
61+
"azure.mgmt.trustedsigning.aio.operations.CertificateProfilesOperations.revoke_certificate": "Microsoft.CodeSigning.CertificateProfiles.revokeCertificate"
62+
}
63+
}

sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._client import TrustedSigningMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import TrustedSigningMgmtClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"TrustedSigningMgmtClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/_client.py

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,25 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from ._configuration import TrustedSigningMgmtClientConfiguration
19-
from ._serialization import Deserializer, Serializer
21+
from ._utils.serialization import Deserializer, Serializer
2022
from .operations import CertificateProfilesOperations, CodeSigningAccountsOperations, Operations
2123

2224
if TYPE_CHECKING:
23-
# pylint: disable=unused-import,ungrouped-imports
2425
from azure.core.credentials import TokenCredential
2526

2627

27-
class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-keyword
28+
class TrustedSigningMgmtClient:
2829
"""Code Signing resource provider api.
2930
3031
:ivar operations: Operations operations
@@ -39,27 +40,33 @@ class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-ke
3940
:type credential: ~azure.core.credentials.TokenCredential
4041
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
4142
:type subscription_id: str
42-
:param base_url: Service host. Default value is "https://management.azure.com".
43+
:param base_url: Service host. Default value is None.
4344
:type base_url: str
4445
:keyword api_version: The API version to use for this operation. Default value is
45-
"2024-02-05-preview". Note that overriding this default value may result in unsupported
46+
"2024-09-30-preview". Note that overriding this default value may result in unsupported
4647
behavior.
4748
:paramtype api_version: str
4849
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4950
Retry-After header is present.
5051
"""
5152

5253
def __init__(
53-
self,
54-
credential: "TokenCredential",
55-
subscription_id: str,
56-
base_url: str = "https://management.azure.com",
57-
**kwargs: Any
54+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
5855
) -> None:
5956
_endpoint = "{endpoint}"
57+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
58+
_endpoints = get_arm_endpoints(_cloud)
59+
if not base_url:
60+
base_url = _endpoints["resource_manager"]
61+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
6062
self._config = TrustedSigningMgmtClientConfiguration(
61-
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
63+
credential=credential,
64+
subscription_id=subscription_id,
65+
base_url=cast(str, base_url),
66+
credential_scopes=credential_scopes,
67+
**kwargs
6268
)
69+
6370
_policies = kwargs.pop("policies", None)
6471
if _policies is None:
6572
_policies = [
@@ -78,7 +85,7 @@ def __init__(
7885
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7986
self._config.http_logging_policy,
8087
]
81-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
88+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
8289

8390
self._serialize = Serializer()
8491
self._deserialize = Deserializer()

sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/_configuration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for TrustedSigningMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -31,7 +30,7 @@ class TrustedSigningMgmtClientConfiguration: # pylint: disable=too-many-instanc
3130
:param base_url: Service host. Default value is "https://management.azure.com".
3231
:type base_url: str
3332
:keyword api_version: The API version to use for this operation. Default value is
34-
"2024-02-05-preview". Note that overriding this default value may result in unsupported
33+
"2024-09-30-preview". Note that overriding this default value may result in unsupported
3534
behavior.
3635
:paramtype api_version: str
3736
"""
@@ -43,7 +42,7 @@ def __init__(
4342
base_url: str = "https://management.azure.com",
4443
**kwargs: Any
4544
) -> None:
46-
api_version: str = kwargs.pop("api_version", "2024-02-05-preview")
45+
api_version: str = kwargs.pop("api_version", "2024-09-30-preview")
4746

4847
if credential is None:
4948
raise ValueError("Parameter 'credential' must not be None.")

sdk/trustedsigning/azure-mgmt-trustedsigning/azure/mgmt/trustedsigning/_patch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# --------------------------------------------------------------------------
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) Python Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)