Skip to content

Commit 3b7dd21

Browse files
author
SDKAuto
committed
CodeGen from PR 34150 in Azure/azure-rest-api-specs
Merge 3abd8c438d3349f899909fb066537e6432f8b87f into 4c0f7731c93696af01bd2bb9927bf28d2afcbc98
1 parent 37034c4 commit 3b7dd21

35 files changed

+1494
-1480
lines changed

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

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

3+
## 1.0.0 (2025-04-28)
4+
5+
### Features Added
6+
7+
- Added enum `OnFailure`
8+
- Added enum `OnSuccess`
9+
- Added model `StorageTaskUpdateProperties`
10+
311
## 1.0.0b2 (2025-04-20)
412

513
### Features Added

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

Lines changed: 2 additions & 2 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 Storageactions 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
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "27046dbff974e3901970aa53b29cec6d8ec1342a",
2+
"commit": "f8da31838c896a6fd3000292dc4800bf2a882aa7",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.27.4",
6+
"@autorest/python@6.34.1",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/storageactions/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/storageactions/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.34.1 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/storageactions/resource-manager/readme.md"
1111
}

sdk/storageactions/azure-mgmt-storageactions/azure/mgmt/storageactions/_storage_actions_mgmt_client.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
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 . import models as _models
1921
from ._configuration import StorageActionsMgmtClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
Operations,
2325
StorageTaskAssignmentOperations,
@@ -36,17 +38,17 @@ class StorageActionsMgmtClient:
3638
:vartype operations: azure.mgmt.storageactions.operations.Operations
3739
:ivar storage_tasks: StorageTasksOperations operations
3840
:vartype storage_tasks: azure.mgmt.storageactions.operations.StorageTasksOperations
39-
:ivar storage_task_assignment: StorageTaskAssignmentOperations operations
40-
:vartype storage_task_assignment:
41-
azure.mgmt.storageactions.operations.StorageTaskAssignmentOperations
4241
:ivar storage_tasks_report: StorageTasksReportOperations operations
4342
:vartype storage_tasks_report:
4443
azure.mgmt.storageactions.operations.StorageTasksReportOperations
44+
:ivar storage_task_assignment: StorageTaskAssignmentOperations operations
45+
:vartype storage_task_assignment:
46+
azure.mgmt.storageactions.operations.StorageTaskAssignmentOperations
4547
:param credential: Credential needed for the client to connect to Azure. Required.
4648
:type credential: ~azure.core.credentials.TokenCredential
4749
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
4850
:type subscription_id: str
49-
:param base_url: Service URL. Default value is "https://management.azure.com".
51+
:param base_url: Service URL. Default value is None.
5052
:type base_url: str
5153
:keyword api_version: Api Version. Default value is "2023-01-01". Note that overriding this
5254
default value may result in unsupported behavior.
@@ -56,15 +58,17 @@ class StorageActionsMgmtClient:
5658
"""
5759

5860
def __init__(
59-
self,
60-
credential: "TokenCredential",
61-
subscription_id: str,
62-
base_url: str = "https://management.azure.com",
63-
**kwargs: Any
61+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
6462
) -> None:
63+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
64+
_endpoints = get_arm_endpoints(_cloud)
65+
if not base_url:
66+
base_url = _endpoints["resource_manager"]
67+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
6568
self._config = StorageActionsMgmtClientConfiguration(
66-
credential=credential, subscription_id=subscription_id, **kwargs
69+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
6770
)
71+
6872
_policies = kwargs.pop("policies", None)
6973
if _policies is None:
7074
_policies = [
@@ -83,18 +87,18 @@ def __init__(
8387
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
8488
self._config.http_logging_policy,
8589
]
86-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
90+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
8791

8892
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
8993
self._serialize = Serializer(client_models)
9094
self._deserialize = Deserializer(client_models)
9195
self._serialize.client_side_validation = False
9296
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
9397
self.storage_tasks = StorageTasksOperations(self._client, self._config, self._serialize, self._deserialize)
94-
self.storage_task_assignment = StorageTaskAssignmentOperations(
98+
self.storage_tasks_report = StorageTasksReportOperations(
9599
self._client, self._config, self._serialize, self._deserialize
96100
)
97-
self.storage_tasks_report = StorageTasksReportOperations(
101+
self.storage_task_assignment = StorageTaskAssignmentOperations(
98102
self._client, self._config, self._serialize, self._deserialize
99103
)
100104

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) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)