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

[ReleasePR track2_azure-mgmt-storage] [SRP] Introduce 2020-08-01-preview version. #13763

Closed
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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,8 @@ async def delete_immutability_policy(
) -> "models.ImmutabilityPolicy":
"""Aborts an unlocked immutability policy. The response of delete has
immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this
operation. Deleting a locked immutability policy is not allowed, only way is to delete the
container after deleting all blobs inside the container.
operation. Deleting a locked immutability policy is not allowed, the only way is to delete the
container after deleting all expired blobs inside the policy locked container.

:param resource_group_name: The name of the resource group within the user's subscription. The
name is case insensitive.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3078,20 +3078,24 @@ class RestorePolicyProperties(msrest.serialization.Model):
:param days: how long this blob can be restored. It should be great than zero and less than
DeleteRetentionPolicy.days.
:type days: int
:ivar last_enabled_time: Returns the date and time the restore policy was last enabled.
:ivar last_enabled_time: Deprecated in favor of minRestoreTime property.
:vartype last_enabled_time: ~datetime.datetime
:ivar min_restore_time: Returns the minimum date and time that the restore can be started.
:vartype min_restore_time: ~datetime.datetime
"""

_validation = {
'enabled': {'required': True},
'days': {'maximum': 365, 'minimum': 1},
'last_enabled_time': {'readonly': True},
'min_restore_time': {'readonly': True},
}

_attribute_map = {
'enabled': {'key': 'enabled', 'type': 'bool'},
'days': {'key': 'days', 'type': 'int'},
'last_enabled_time': {'key': 'lastEnabledTime', 'type': 'iso-8601'},
'min_restore_time': {'key': 'minRestoreTime', 'type': 'iso-8601'},
}

def __init__(
Expand All @@ -3102,6 +3106,7 @@ def __init__(
self.enabled = kwargs['enabled']
self.days = kwargs.get('days', None)
self.last_enabled_time = None
self.min_restore_time = None


class Restriction(msrest.serialization.Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3305,20 +3305,24 @@ class RestorePolicyProperties(msrest.serialization.Model):
:param days: how long this blob can be restored. It should be great than zero and less than
DeleteRetentionPolicy.days.
:type days: int
:ivar last_enabled_time: Returns the date and time the restore policy was last enabled.
:ivar last_enabled_time: Deprecated in favor of minRestoreTime property.
:vartype last_enabled_time: ~datetime.datetime
:ivar min_restore_time: Returns the minimum date and time that the restore can be started.
:vartype min_restore_time: ~datetime.datetime
"""

_validation = {
'enabled': {'required': True},
'days': {'maximum': 365, 'minimum': 1},
'last_enabled_time': {'readonly': True},
'min_restore_time': {'readonly': True},
}

_attribute_map = {
'enabled': {'key': 'enabled', 'type': 'bool'},
'days': {'key': 'days', 'type': 'int'},
'last_enabled_time': {'key': 'lastEnabledTime', 'type': 'iso-8601'},
'min_restore_time': {'key': 'minRestoreTime', 'type': 'iso-8601'},
}

def __init__(
Expand All @@ -3332,6 +3336,7 @@ def __init__(
self.enabled = enabled
self.days = days
self.last_enabled_time = None
self.min_restore_time = None


class Restriction(msrest.serialization.Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,8 @@ def delete_immutability_policy(
# type: (...) -> "models.ImmutabilityPolicy"
"""Aborts an unlocked immutability policy. The response of delete has
immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this
operation. Deleting a locked immutability policy is not allowed, only way is to delete the
container after deleting all blobs inside the container.
operation. Deleting a locked immutability policy is not allowed, the only way is to delete the
container after deleting all expired blobs inside the policy locked container.

:param resource_group_name: The name of the resource group within the user's subscription. The
name is case insensitive.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._storage_management_client import StorageManagementClient
__all__ = ['StorageManagementClient']

try:
from ._patch import patch_sdk
patch_sdk()
except ImportError:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential

VERSION = "unknown"

class StorageManagementClientConfiguration(Configuration):
"""Configuration for StorageManagementClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
"""

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
**kwargs # type: Any
):
# type: (...) -> None
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(StorageManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-08-01-preview"
self.credential_scopes = ['https://management.azure.com/.default']
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
kwargs.setdefault('sdk_moniker', 'mgmt-storage/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
self,
**kwargs # type: Any
):
# type: (...) -> None
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"chosen_version": "2020-08-01-preview",
"total_api_version_list": ["2020-08-01-preview"],
"client": {
"name": "StorageManagementClient",
"filename": "_storage_management_client",
"description": "The Azure Storage Management API."
},
"global_parameters": {
"sync_method": {
"credential": {
"method_signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
},
"async_method": {
"credential": {
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"]
},
"operation_groups": {
"operations": "Operations",
"skus": "SkusOperations",
"storage_accounts": "StorageAccountsOperations",
"deleted_accounts": "DeletedAccountsOperations",
"usages": "UsagesOperations",
"management_policies": "ManagementPoliciesOperations",
"private_endpoint_connections": "PrivateEndpointConnectionsOperations",
"private_link_resources": "PrivateLinkResourcesOperations",
"object_replication_policies": "ObjectReplicationPoliciesOperations",
"encryption_scopes": "EncryptionScopesOperations",
"blob_services": "BlobServicesOperations",
"blob_containers": "BlobContainersOperations",
"file_services": "FileServicesOperations",
"file_shares": "FileSharesOperations",
"queue_services": "QueueServicesOperations",
"queue": "QueueOperations",
"table_services": "TableServicesOperations",
"table": "TableOperations"
},
"operation_mixins": {
},
"sync_imports": "None",
"async_imports": "None"
}
Loading