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]Adding allowBlobPublicAccess and minimumTlsVersion property for June19 and April19 #12141

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
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ async def check_name_availability(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(account_name, 'StorageAccountCheckNameAvailabilityParameters')
body_content_kwargs['content'] = body_content
Expand All @@ -108,8 +107,8 @@ async def _create_initial(
account_name: str,
parameters: "models.StorageAccountCreateParameters",
**kwargs
) -> "models.StorageAccount":
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccount"]
) -> Optional["models.StorageAccount"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.StorageAccount"]]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2015-06-15"
Expand All @@ -133,7 +132,6 @@ async def _create_initial(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters')
body_content_kwargs['content'] = body_content
Expand Down Expand Up @@ -162,7 +160,7 @@ async def begin_create(
account_name: str,
parameters: "models.StorageAccountCreateParameters",
**kwargs
) -> "models.StorageAccount":
) -> AsyncLROPoller["models.StorageAccount"]:
"""Asynchronously creates a new storage account with the specified parameters. If an account is
already created and a subsequent create request is issued with different properties, the
account properties will be updated. If an account is already created and a subsequent create or
Expand All @@ -183,8 +181,8 @@ async def begin_create(
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: StorageAccount, or the result of cls(response)
:rtype: ~azure.mgmt.storage.v2015_06_15.models.StorageAccount
:return: An instance of AsyncLROPoller that returns either StorageAccount or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.storage.v2015_06_15.models.StorageAccount]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -268,7 +266,6 @@ async def delete(
# Construct headers
header_parameters = {} # type: Dict[str, Any]

# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down Expand Up @@ -326,7 +323,6 @@ async def get_properties(
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down Expand Up @@ -397,7 +393,6 @@ async def update(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters')
body_content_kwargs['content'] = body_content
Expand Down Expand Up @@ -436,6 +431,10 @@ def list(
api_version = "2015-06-15"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
Expand All @@ -447,15 +446,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down Expand Up @@ -504,6 +499,10 @@ def list_by_resource_group(
api_version = "2015-06-15"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list_by_resource_group.metadata['url'] # type: ignore
Expand All @@ -516,15 +515,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down Expand Up @@ -593,7 +588,6 @@ async def list_keys(
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down Expand Up @@ -657,7 +651,6 @@ async def regenerate_key(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(regenerate_key, 'StorageAccountRegenerateKeyParameters')
body_content_kwargs['content'] = body_content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def list(
api_version = "2015-06-15"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
Expand All @@ -69,15 +73,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def check_name_availability(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(account_name, 'StorageAccountCheckNameAvailabilityParameters')
body_content_kwargs['content'] = body_content
Expand Down Expand Up @@ -114,8 +113,8 @@ def _create_initial(
parameters, # type: "models.StorageAccountCreateParameters"
**kwargs # type: Any
):
# type: (...) -> "models.StorageAccount"
cls = kwargs.pop('cls', None) # type: ClsType["models.StorageAccount"]
# type: (...) -> Optional["models.StorageAccount"]
cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.StorageAccount"]]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2015-06-15"
Expand All @@ -139,7 +138,6 @@ def _create_initial(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'StorageAccountCreateParameters')
body_content_kwargs['content'] = body_content
Expand Down Expand Up @@ -169,7 +167,7 @@ def begin_create(
parameters, # type: "models.StorageAccountCreateParameters"
**kwargs # type: Any
):
# type: (...) -> LROPoller
# type: (...) -> LROPoller["models.StorageAccount"]
"""Asynchronously creates a new storage account with the specified parameters. If an account is
already created and a subsequent create request is issued with different properties, the
account properties will be updated. If an account is already created and a subsequent create or
Expand Down Expand Up @@ -276,7 +274,6 @@ def delete(
# Construct headers
header_parameters = {} # type: Dict[str, Any]

# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down Expand Up @@ -335,7 +332,6 @@ def get_properties(
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down Expand Up @@ -407,7 +403,6 @@ def update(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'StorageAccountUpdateParameters')
body_content_kwargs['content'] = body_content
Expand Down Expand Up @@ -447,6 +442,10 @@ def list(
api_version = "2015-06-15"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
Expand All @@ -458,15 +457,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

def extract_data(pipeline_response):
Expand Down Expand Up @@ -516,6 +511,10 @@ def list_by_resource_group(
api_version = "2015-06-15"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list_by_resource_group.metadata['url'] # type: ignore
Expand All @@ -528,15 +527,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

def extract_data(pipeline_response):
Expand Down Expand Up @@ -606,7 +601,6 @@ def list_keys(
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down Expand Up @@ -671,7 +665,6 @@ def regenerate_key(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(regenerate_key, 'StorageAccountRegenerateKeyParameters')
body_content_kwargs['content'] = body_content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def list(
api_version = "2015-06-15"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
Expand All @@ -74,15 +78,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

def extract_data(pipeline_response):
Expand Down
Loading